HoldBegin Class Reference
 
 
 
HoldBegin Class Reference

#include <HoldBegin.h>

Inheritance diagram for HoldBegin:
MaxHeapOperators

Public Member Functions

  HoldBegin (const MCHAR *message)
  Constructor.
  HoldBegin ()
  Constructor.
  ~HoldBegin ()
  Destructor.
void  Cancel ()
  Cancels the hold by calling Hold::Cancel.
void  Accept ()
  Accepts the hold, and calls Hold::Accept.
void  Accept (const MCHAR *message)
  Accepts the hold.

Constructor & Destructor Documentation

HoldBegin ( const MCHAR *  message )

Constructor.

Parameters:
message - The string to pass to Hold::Accept.
HoldBegin ( )

Constructor.

~HoldBegin ( )

Destructor.

By default will accept the undo operation. If the stack is unwinding due to an exception it will cancel the undo operation


Member Function Documentation

void Cancel ( )

Cancels the hold by calling Hold::Cancel.

Cannot be called after HoldBegin::Accept is called. Calling this multiple times will have no effect. After calling this, the instance of this class has fulfilled its task and nothing more can be done with it.

void Accept ( )

Accepts the hold, and calls Hold::Accept.

Cannot be called after HoldBegin::Cancel is called. Calling this multiple times will have no effect. After calling this, the instance of this class has fulfilled its task and nothing more can be done with it.

void Accept ( const MCHAR *  message )

Accepts the hold.

When this is called, mMessage (specified via HoldBegin::HoldBegin(MCHAR*) is ignored. Cannot be called after HoldBegin::Cancel is called. Calling this multiple times will have no effect. After calling this, the instance of this class has fulfilled its task and nothing more can be done with it.

Parameters:
message - A message to pass to Hold::Accept.