PDFix SDK  6.5.0
PsCommand Struct Referenceabstract

PsCommand class. More...

Public Member Functions

virtual void Destroy ()=0
 Destroys the specified command and its associated resources. More...
 
virtual PsCommandStatus Execute (PdfCancelProc cancel_proc, void *cancel_data)=0
 Destroys the specified command and its associated resources. More...
 
virtual bool LoadFromStream (PsStream *stream, PsDataFormat format)=0
 
virtual bool SaveToStream (PsStream *stream, PsDataFormat format)=0
 Exports command configuration into a stream. Only JSON format is supported. More...
 

Detailed Description

PsCommand class.

A PsCommand represents an action that the user can perform on the current document. Specifically, a PsCommand represents a command which can be added to a command sequence and executed either interactively or via batch processing.

Member Function Documentation

◆ Destroy()

virtual void PsCommand::Destroy ( )
pure virtual

Destroys the specified command and its associated resources.

See also
Pdfix::CreateCommand

◆ Execute()

virtual PsCommandStatus PsCommand::Execute ( PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Destroys the specified command and its associated resources.

Parameters
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
The current status of cmd.

◆ LoadFromStream()

virtual bool PsCommand::LoadFromStream ( PsStream stream,
PsDataFormat  format 
)
pure virtual

Imports a command configuration from a stream. The configuration settings will not be updated if the command is not in a ready state.Only JSON format is supported.

Parameters
streamSource stream of the metadata.
formatFormat of the source stream. Only JSON format is supported./
Returns
true if the command configuration was loaded successfuly.

◆ SaveToStream()

virtual bool PsCommand::SaveToStream ( PsStream stream,
PsDataFormat  format 
)
pure virtual

Exports command configuration into a stream. Only JSON format is supported.

Parameters
streamSource stream of the metadata.
formatFormat of the source stream. Only JSON format is supported.
Returns
true if the the command configuration was exported successfuly.