vtkSMTrace is used to produce Python trace in the ParaView application. More...
#include <vtkSMTrace.h>
Classes | |
class | TraceItem |
class | TraceItemArgs |
Public Types | |
enum | { RECORD_ALL_PROPERTIES = 0, RECORD_MODIFIED_PROPERTIES = 1, RECORD_USER_MODIFIED_PROPERTIES = 2 } |
typedef vtkSMObject | Superclass |
Public Types inherited from vtkSMObject | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
virtual void | SetPropertiesToTraceOnCreate (int) |
virtual int | GetPropertiesToTraceOnCreate () |
std::string | GetCurrentTrace () |
Return the current trace. More... | |
virtual void | SetTraceXMLDefaults (bool) |
Get/Set whether all properties should be saved for a proxy, including the default values. More... | |
virtual bool | GetTraceXMLDefaults () |
Get/Set whether all properties should be saved for a proxy, including the default values. More... | |
virtual void | SetLogTraceToStdout (bool) |
Log generated trace to stdout as the trace is being generated (useful for debugging). More... | |
virtual bool | GetLogTraceToStdout () |
Log generated trace to stdout as the trace is being generated (useful for debugging). More... | |
virtual void | SetFullyTraceSupplementalProxies (bool) |
Supplemental proxies are proxies that not explicitly created by the user i.e. More... | |
virtual bool | GetFullyTraceSupplementalProxies () |
Supplemental proxies are proxies that not explicitly created by the user i.e. More... | |
virtual void | SetSkipRenderingComponents (bool) |
Skip rendering components such as views, representations. More... | |
virtual bool | GetSkipRenderingComponents () |
Skip rendering components such as views, representations. More... | |
virtual void | SetFullyTraceCameraAdjustments (bool) |
The trace will include camera interaction. More... | |
virtual bool | GetFullyTraceCameraAdjustments () |
The trace will include camera interaction. More... | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual vtkMTimeType | GetMTime () |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
Static Public Member Functions | |
static vtkSMTrace * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMTrace * | SafeDownCast (vtkObject *o) |
static vtkSMTrace * | GetActiveTracer () |
Provides access to the "active" tracer. More... | |
static vtkSMTrace * | StartTrace (const char *preamble=nullptr) |
Methods to start/stop tracing. More... | |
static std::string | StopTrace () |
Stop trace and return the generated trace script. More... | |
static std::string | GetState (vtkSMProxy *options) |
Generate a Python state for the application and return it. More... | |
Static Public Member Functions inherited from vtkSMObject | |
static vtkSMObject * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMObject * | SafeDownCast (vtkObject *o) |
static std::string | CreatePrettyLabel (const std::string &name) |
Return a well-formated label using provided name by adding spaces between lower cases and upper cases: More... | |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
static vtkObjectBase * | New () |
bool | TraceXMLDefaults |
Returns true of there's an error. More... | |
bool | LogTraceToStdout |
Returns true of there's an error. More... | |
int | PropertiesToTraceOnCreate |
Returns true of there's an error. More... | |
bool | FullyTraceSupplementalProxies |
Returns true of there's an error. More... | |
bool | SkipRenderingComponents |
Returns true of there's an error. More... | |
bool | FullyTraceCameraAdjustments |
Returns true of there's an error. More... | |
class | TraceItem |
Returns true of there's an error. More... | |
vtkSMTrace () | |
Returns true of there's an error. More... | |
~vtkSMTrace () override | |
Returns true of there's an error. More... | |
bool | CheckForError () |
Returns true of there's an error. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from vtkSMObject | |
vtkSMObject () | |
~vtkSMObject () override | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
virtual | ~vtkObject () |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
vtkSMTrace is used to produce Python trace in the ParaView application.
vtkSMTrace is used to produce Python trace in the ParaView application. To start/stop trace, use the static API vtkSMTrace::StartTrace() and vtkSMTrace::StopTrace(). That sets up the vtkSMTrace instance used as the ActiveTracer. You can setup configuration parameters on the vtkSMTrace instance returned by vtkSMTrace::StartTrace(). The configuration parameters control various aspects of the trace.
To effective tracing, the application logic should explicitly trace traceable actions by using the SM_SCOPED_TRACE() macro. This macro will have any effect only when there's an ActiveTracer setup i.e tracing is in effect. The result on using SM_SCOPED_TRACE() when tracing is active, is to crate a Python class instance. The name of the class is the argument to SM_SCOPED_TRACE() and the class is defined in paraview.smtrace module. There are various classes defined for tracing specific actions like Show, RegisterViewProxy, and generic actions like PropertiesModified. Keyword or positional arguments can be passed to the constructor using the following the syntax:
The constructed class instance is finalized
and deleted when the temporary variable created by the macro goes out of scope (hence the name SM_SCOPED_TRACE).
Definition at line 59 of file vtkSMTrace.h.
typedef vtkSMObject vtkSMTrace::Superclass |
Definition at line 63 of file vtkSMTrace.h.
anonymous enum |
Enumerator | |
---|---|
RECORD_ALL_PROPERTIES | |
RECORD_MODIFIED_PROPERTIES | |
RECORD_USER_MODIFIED_PROPERTIES |
Definition at line 137 of file vtkSMTrace.h.
|
protected |
Returns true of there's an error.
Otherwise, returns false.
|
overrideprotected |
Returns true of there's an error.
Otherwise, returns false.
|
static |
|
virtual |
Reimplemented from vtkSMObject.
Reimplemented from vtkSMObject.
|
static |
|
overridevirtual |
Reimplemented from vtkSMObject.
|
inlinestatic |
Provides access to the "active" tracer.
There can only be one active tracer in the application currently.
Definition at line 70 of file vtkSMTrace.h.
|
static |
Methods to start/stop tracing.
This will create a new instance of vtkSMTrace and set that up as the active tracer. If an active tracer is already present, then this will simply return the current active tracer.
preamble
non-null string to use as the header for the generated trace. If nullptr, then a default preamble using ParaView version number will be used. If empty string, then no preamble will be added added.
|
static |
Stop trace and return the generated trace script.
This will also destroy the active tracer.
|
virtual |
Get/Set whether all properties should be saved for a proxy, including the default values.
If false, only the properties that have been modified from the XML-defaults will be logged.
|
virtual |
Get/Set whether all properties should be saved for a proxy, including the default values.
If false, only the properties that have been modified from the XML-defaults will be logged.
|
virtual |
Log generated trace to stdout as the trace is being generated (useful for debugging).
|
virtual |
Log generated trace to stdout as the trace is being generated (useful for debugging).
|
virtual |
Supplemental proxies are proxies that not explicitly created by the user i.e.
proxies such as lookup tables, scalar bars, animation scene, etc. When set to true (default is false), the first time such a proxy is encountered in the trace, the trace will log the property values on that proxy using the PropertiesToTraceOnCreate rules.
|
virtual |
Supplemental proxies are proxies that not explicitly created by the user i.e.
proxies such as lookup tables, scalar bars, animation scene, etc. When set to true (default is false), the first time such a proxy is encountered in the trace, the trace will log the property values on that proxy using the PropertiesToTraceOnCreate rules.
|
virtual |
Skip rendering components such as views, representations.
|
virtual |
Skip rendering components such as views, representations.
|
virtual |
The trace will include camera interaction.
(default false)
|
virtual |
The trace will include camera interaction.
(default false)
|
virtual |
|
virtual |
std::string vtkSMTrace::GetCurrentTrace | ( | ) |
Return the current trace.
|
static |
Generate a Python state for the application and return it.
Note this cannot be called when Python tracing is active.
options
is a proxy with options to customize the state generation such as `('pythontracing', 'PythonStateOptions')`.
|
protected |
Returns true of there's an error.
Otherwise, returns false.
|
friend |
Returns true of there's an error.
Otherwise, returns false.
Definition at line 243 of file vtkSMTrace.h.
|
protected |
Returns true of there's an error.
Otherwise, returns false.
Definition at line 228 of file vtkSMTrace.h.
|
protected |
Returns true of there's an error.
Otherwise, returns false.
Definition at line 229 of file vtkSMTrace.h.
|
protected |
Returns true of there's an error.
Otherwise, returns false.
Definition at line 230 of file vtkSMTrace.h.
|
protected |
Returns true of there's an error.
Otherwise, returns false.
Definition at line 231 of file vtkSMTrace.h.
|
protected |
Returns true of there's an error.
Otherwise, returns false.
Definition at line 232 of file vtkSMTrace.h.
|
protected |
Returns true of there's an error.
Otherwise, returns false.
Definition at line 233 of file vtkSMTrace.h.