OpException Class Reference

#include <exceptio.h>

Inheritance diagram for OpException:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpException ()
 Constructor for OpException operation. It is not undoable.
void Do (OpDescriptor *)
 Creates various types of exceptions to verify exception handling.

Static Public Member Functions

static OpState GetState (String_256 *, OpDescriptor *)
 This item is always available.
static BOOL Init ()
 This item is always available.
static void BlowUpOnCrashMe ()

Static Private Attributes

static LPBYTE lpByte = NULL
static INT32 iZero [2]
static double dZero [2]
static BOOL RenderTrap = FALSE

Detailed Description

Definition at line 105 of file exceptio.h.


Constructor & Destructor Documentation

OpException::OpException  ) 
 

Constructor for OpException operation. It is not undoable.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/10/93
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: None

Definition at line 183 of file exceptio.cpp.

00184 {
00185 }


Member Function Documentation

static void OpException::BlowUpOnCrashMe  )  [inline, static]
 

Definition at line 117 of file exceptio.h.

00118         {
00119             if  ( RenderTrap )
00120             {
00121                 RenderTrap = FALSE ;
00122                 volatile BYTE data;
00123                 volatile BYTE * p = &data;
00124                 *p = *lpByte;
00125             }
00126         }

void OpException::Do OpDescriptor WhichOp  )  [virtual]
 

Creates various types of exceptions to verify exception handling.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/10/93
Parameters:
None [INPUTS]
None [OUTPUTS]
Returns:
None

Errors: -

Reimplemented from Operation.

Definition at line 140 of file exceptio.cpp.

00141 {
00142     if (WhichOp->Token == String( OPTOKEN_EXCEPTION_PTR) )
00143         GlobalByte = *lpByte;
00144     else if (WhichOp->Token == String( OPTOKEN_EXCEPTION_INT ) )
00145         iZero[1] = 1 / iZero[0];
00146     else if (WhichOp->Token == String( OPTOKEN_EXCEPTION_DBL ) )
00147         dZero[1] = 1 / dZero[0];                                    
00148     else
00149     {
00150         DocView *pDocView = DocView::GetSelected();
00151         if (pDocView != NULL)
00152         {
00153             pDocView->ForceRedraw();                                        // posts the paint message
00154             CWindowID pWnd = DocView::GetCurrentRenderWindow();
00155             if (pWnd)
00156             {
00157                 // Set trap for later
00158                 RenderTrap = TRUE;                                      
00159                 // Now do the paint
00160                 TRACE( _T("Into update explosion\n"));
00161                 pWnd->Update();                                     // do the paint
00162                 TRACE( _T("Out of update explosion\n"));
00163             }
00164         }
00165     }
00166 }

OpState OpException::GetState String_256 ,
OpDescriptor
[static]
 

This item is always available.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/10/93
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: None

Definition at line 203 of file exceptio.cpp.

00204 {
00205     OpState OpSt;
00206 
00207     return OpSt;
00208 }

BOOL OpException::Init void   )  [static]
 

This item is always available.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/10/93
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:
TRUE if worked, FALSE if not.

Errors: Uses SetError if fails. Scope: Static

Reimplemented from SimpleCCObject.

Definition at line 226 of file exceptio.cpp.

00227 {
00228 
00229     OpDescriptor *OpEx[4];
00230     
00231     OpEx[0] = new OpDescriptor( 0,
00232                             _R(IDM_CRASHME_PTR),
00233                             CC_RUNTIME_CLASS(OpException),
00234                             OPTOKEN_EXCEPTION_PTR,
00235                             OpException::GetState
00236                                             );
00237 
00238     OpEx[1] = new OpDescriptor(
00239                             0,
00240                             _R(IDM_CRASHME_INT),
00241                             CC_RUNTIME_CLASS(OpException),
00242                             OPTOKEN_EXCEPTION_INT,
00243                             OpException::GetState
00244                                             );
00245 
00246     OpEx[2] = new OpDescriptor( 
00247                             0,
00248                             _R(IDM_CRASHME_DBL),
00249                             CC_RUNTIME_CLASS(OpException),
00250                             OPTOKEN_EXCEPTION_DBL,
00251                             OpException::GetState
00252                                             );
00253 
00254     OpEx[3] = new OpDescriptor( 
00255                             0,
00256                             _R(IDM_CRASHME_REN),
00257                             CC_RUNTIME_CLASS(OpException),
00258                             OPTOKEN_EXCEPTION_REN,
00259                             OpException::GetState
00260                                             );
00261 
00262 
00263     if (!( OpEx[0] && OpEx[1] && OpEx[2] && OpEx[3]))
00264         return FALSE;
00265 
00266     return TRUE;
00267 }


Member Data Documentation

double OpException::dZero [static, private]
 

Definition at line 132 of file exceptio.h.

INT32 OpException::iZero [static, private]
 

Definition at line 131 of file exceptio.h.

LPBYTE OpException::lpByte = NULL [static, private]
 

Definition at line 130 of file exceptio.h.

BOOL OpException::RenderTrap = FALSE [static, private]
 

Definition at line 133 of file exceptio.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:58:11 2007 for Camelot by  doxygen 1.4.4