InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CmdUtils::SequencePtr Class Reference

#include <CmdUtils.h>

Public Member Functions

 SequencePtr ()
 
 ~SequencePtr ()
 
bool16 Success ()
 
ErrorCode State ()
 
ICommandSequenceoperator-> ()
 

Detailed Description

Stack based helper class that encapsulates a command sequence (ICommandSequence). The difference between this class and CmdUtils::SequenceContext is that this class always creates a new sequence. The changes made by commands processed within the sequence are commited if the global error code is kSuccess when this helper class goes out of scope, otherwise the database is rolled back to its state before the sequence started (see CmdUtils::EndCommandSequence(ICommandSequence *)).

See Also
ICommandSequence
CmdUtils::SequenceContext

Constructor & Destructor Documentation

CmdUtils::SequencePtr::SequencePtr ()
inlineexplicit

Constructor creates a command sequence.

CmdUtils::SequencePtr::~SequencePtr ()

Destructor ends the sequence.

See Also
CmdUtils::EndCommandSequence(ICommandSequence *)

Member Function Documentation

ICommandSequence* CmdUtils::SequencePtr::operator-> ()
inline

Get the command sequence.

Returns
the command sequence.
ErrorCode CmdUtils::SequencePtr::State ()

Get the error state.

Returns
the global error code
See Also
ErrorUtils::PMGetGlobalErrorCode
bool16 CmdUtils::SequencePtr::Success ()
inline

Returns kTrue if the error state is kSuccess