ParaView
|
Run-time VTK interpreter. More...
#include <vtkClientServerInterpreter.h>
Inherits vtkObject.
Classes | |
struct | NewCallbackInfo |
The callback data structure passed to observers looking for VTK object creation and deletion events. More... | |
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &, vtkIndent) |
int | ProcessOneMessage (const vtkClientServerStream &css, int message) |
Process the message with the given index in the given stream. More... | |
const vtkClientServerStream * | GetMessageFromID (vtkClientServerID id) |
Get the message for an ID. More... | |
const vtkClientServerStream & | GetLastResult () const |
Get the last result message. More... | |
vtkObjectBase * | GetObjectFromID (vtkClientServerID id) |
Return a pointer to a vtkObjectBase for an ID whose message contains only the one object. More... | |
vtkObjectBase * | GetObjectFromID (vtkClientServerID id, int noerror) |
vtkClientServerID | GetIDFromObject (vtkObjectBase *key) |
Return an ID given a pointer to a vtkObjectBase (or 0 if object is not found) More... | |
int | NewInstance (vtkObjectBase *obj, vtkClientServerID id) |
Called by generated code to register a new class instance. More... | |
vtkObjectBase * | NewInstance (const char *classname) |
Creates a new instance for the class specified using the interpreter. More... | |
int | NewObserver (vtkObject *obj, const char *event, const vtkClientServerStream &css) |
Called by generated code to add an observer to a wrapped object. More... | |
void | AddCommandFunction (const char *cname, vtkClientServerCommandFunction func, void *ctx=NULL, vtkContextFreeFunction ctx_free=NULL) |
Add a command function for a class. More... | |
bool | HasCommandFunction (const char *cname) |
Return true if the classname has a command function, false otherwise. More... | |
int | CallCommandFunction (const char *classname, vtkObjectBase *ptr, const char *method, const vtkClientServerStream &msg, vtkClientServerStream &result) |
Call a command function. More... | |
void | AddNewInstanceFunction (const char *cname, vtkClientServerNewInstanceFunction f, void *ctx=NULL, vtkContextFreeFunction ctx_free=NULL) |
Add a function used to create new objects. More... | |
void | ClearLastResult () |
Resets the LastResult stream. More... | |
vtkClientServerID | GetNextAvailableId () |
Return the next available Id that can be used to create a new object. More... | |
int | ProcessStream (const unsigned char *msg, size_t msgLength) |
Process all messages in a given vtkClientServerStream. More... | |
int | ProcessStream (const vtkClientServerStream &css) |
Process all messages in a given vtkClientServerStream. More... | |
void | SetLogFile (const char *name) |
Get/Set a stream to which an execution log is written. More... | |
virtual void | SetLogStream (ostream *ostr) |
Get/Set a stream to which an execution log is written. More... | |
virtual ostream * | GetLogStream () |
Get/Set a stream to which an execution log is written. More... | |
int | Load (const char *moduleName) |
Dynamically load a wrapper module into the interpreter. More... | |
int | Load (const char *moduleName, const char *const *optionalPaths) |
Dynamically load a wrapper module into the interpreter. More... | |
Static Public Member Functions | |
static vtkClientServerInterpreter * | New () |
static int | IsTypeOf (const char *type) |
static vtkClientServerInterpreter * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkClientServerInterpreter () | |
~vtkClientServerInterpreter () | |
int | ProcessCommandNew (const vtkClientServerStream &css, int midx) |
int | ProcessCommandInvoke (const vtkClientServerStream &css, int midx) |
int | ProcessCommandDelete (const vtkClientServerStream &css, int midx) |
int | ProcessCommandAssign (const vtkClientServerStream &css, int midx) |
int | ExpandMessage (const vtkClientServerStream &in, int inIndex, int startArgument, vtkClientServerStream &out) |
int | LoadImpl (const char *moduleName) |
int | LoadInternal (const char *moduleName, const char *fullPath) |
Protected Attributes | |
ostream * | LogStream |
ofstream * | LogFileStream |
Friends | |
class | vtkClientServerInterpreterCommand |
Run-time VTK interpreter.
vtkClientServerInterpreter will process messages stored in a vtkClientServerStream. This allows run-time creation and execution of VTK programs.
Definition at line 64 of file vtkClientServerInterpreter.h.
typedef vtkObject vtkClientServerInterpreter::Superclass |
Definition at line 68 of file vtkClientServerInterpreter.h.
|
protected |
|
protected |
|
static |
|
virtual |
|
static |
|
virtual |
|
static |
void vtkClientServerInterpreter::PrintSelf | ( | ostream & | , |
vtkIndent | |||
) |
int vtkClientServerInterpreter::ProcessStream | ( | const unsigned char * | msg, |
size_t | msgLength | ||
) |
Process all messages in a given vtkClientServerStream.
Return 1 if all messages succeeded, and 0 otherwise.
int vtkClientServerInterpreter::ProcessStream | ( | const vtkClientServerStream & | css | ) |
Process all messages in a given vtkClientServerStream.
Return 1 if all messages succeeded, and 0 otherwise.
int vtkClientServerInterpreter::ProcessOneMessage | ( | const vtkClientServerStream & | css, |
int | message | ||
) |
Process the message with the given index in the given stream.
Returns 1 for success, 0 for failure.
const vtkClientServerStream* vtkClientServerInterpreter::GetMessageFromID | ( | vtkClientServerID | id | ) |
Get the message for an ID.
ID 0 always returns a NULL message.
const vtkClientServerStream& vtkClientServerInterpreter::GetLastResult | ( | ) | const |
Get the last result message.
|
inline |
Return a pointer to a vtkObjectBase for an ID whose message contains only the one object.
Definition at line 100 of file vtkClientServerInterpreter.h.
vtkObjectBase* vtkClientServerInterpreter::GetObjectFromID | ( | vtkClientServerID | id, |
int | noerror | ||
) |
vtkClientServerID vtkClientServerInterpreter::GetIDFromObject | ( | vtkObjectBase * | key | ) |
Return an ID given a pointer to a vtkObjectBase (or 0 if object is not found)
void vtkClientServerInterpreter::SetLogFile | ( | const char * | name | ) |
Get/Set a stream to which an execution log is written.
|
virtual |
Get/Set a stream to which an execution log is written.
|
virtual |
Get/Set a stream to which an execution log is written.
int vtkClientServerInterpreter::NewInstance | ( | vtkObjectBase * | obj, |
vtkClientServerID | id | ||
) |
Called by generated code to register a new class instance.
Do not call directly.
vtkObjectBase* vtkClientServerInterpreter::NewInstance | ( | const char * | classname | ) |
Creates a new instance for the class specified using the interpreter.
int vtkClientServerInterpreter::NewObserver | ( | vtkObject * | obj, |
const char * | event, | ||
const vtkClientServerStream & | css | ||
) |
Called by generated code to add an observer to a wrapped object.
Do not call directly.
void vtkClientServerInterpreter::AddCommandFunction | ( | const char * | cname, |
vtkClientServerCommandFunction | func, | ||
void * | ctx = NULL , |
||
vtkContextFreeFunction | ctx_free = NULL |
||
) |
Add a command function for a class.
bool vtkClientServerInterpreter::HasCommandFunction | ( | const char * | cname | ) |
Return true if the classname has a command function, false otherwise.
int vtkClientServerInterpreter::CallCommandFunction | ( | const char * | classname, |
vtkObjectBase * | ptr, | ||
const char * | method, | ||
const vtkClientServerStream & | msg, | ||
vtkClientServerStream & | result | ||
) |
Call a command function.
void vtkClientServerInterpreter::AddNewInstanceFunction | ( | const char * | cname, |
vtkClientServerNewInstanceFunction | f, | ||
void * | ctx = NULL , |
||
vtkContextFreeFunction | ctx_free = NULL |
||
) |
Add a function used to create new objects.
void vtkClientServerInterpreter::ClearLastResult | ( | ) |
Resets the LastResult stream.
int vtkClientServerInterpreter::Load | ( | const char * | moduleName | ) |
Dynamically load a wrapper module into the interpreter.
Returns 1 for success and 0 for failure.
int vtkClientServerInterpreter::Load | ( | const char * | moduleName, |
const char *const * | optionalPaths | ||
) |
Dynamically load a wrapper module into the interpreter.
Returns 1 for success and 0 for failure.
vtkClientServerID vtkClientServerInterpreter::GetNextAvailableId | ( | ) |
Return the next available Id that can be used to create a new object.
This only work if all class that created object into the interpretor have used this method. Basically it is just a counter available with the interpreter instance.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
friend |
Definition at line 224 of file vtkClientServerInterpreter.h.
|
protected |
Definition at line 198 of file vtkClientServerInterpreter.h.
|
protected |
Definition at line 199 of file vtkClientServerInterpreter.h.