RavEngine
Loading...
Searching...
No Matches
OmniPvdWriter Class Referenceabstract

Used to write debug information to an OmniPvdWriteStream. More...

#include <OmniPvdWriter.h>

Inheritance diagram for OmniPvdWriter:
[legend]

Public Member Functions

virtual void OMNI_PVD_CALL setLogFunction (OmniPvdLogFunction logFunction)=0
 Sets the log function to print the internal debug messages of the OmniPVD API.
 
virtual void OMNI_PVD_CALL setWriteStream (const OmniPvdWriteStream *writeStream)=0
 Sets the write stream to receive the API command stream.
 
virtual OmniPvdWriteStream *OMNI_PVD_CALL getWriteStream ()=0
 Gets the pointer to the write stream.
 
virtual OmniPvdClassHandle OMNI_PVD_CALL registerClass (const char *className, OmniPvdClassHandle baseClassHandle=0)=0
 Registers an OmniPVD class.
 
virtual OmniPvdAttributeHandle OMNI_PVD_CALL registerEnumValue (const OmniPvdClassHandle classHandle, const char *attributeName, const uint32_t value)=0
 Registers an enum name and corresponding value for a pre-registered class.
 
virtual OmniPvdAttributeHandle OMNI_PVD_CALL registerAttribute (const OmniPvdClassHandle classHandle, const char *attributeName, const OmniPvdAttributeDataType attributeDataType, const uint32_t nbrFields)=0
 Registers an attribute.
 
virtual OmniPvdAttributeHandle OMNI_PVD_CALL registerFlagsAttribute (const OmniPvdClassHandle classHandle, const OmniPvdClassHandle enumClassHandle, const char *attributeName)=0
 Registers an attribute which is a flag.
 
virtual OmniPvdAttributeHandle OMNI_PVD_CALL registerClassAttribute (const OmniPvdClassHandle classHandle, const char *attributeName, const OmniPvdClassHandle classAttributeHandle)=0
 Registers an attribute which is a class.
 
virtual OmniPvdAttributeHandle OMNI_PVD_CALL registerSetAttribute (const OmniPvdClassHandle classHandle, const char *attributeName, const OmniPvdAttributeDataType attributeDataType)=0
 Registers an attribute which is a set.
 
virtual void OMNI_PVD_CALL setAttribute (const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle, const uint8_t handleDepth, const OmniPvdAttributeHandle *attributeHandles, const uint8_t *data, const uint32_t nbrBytes)=0
 Sets an attribute value.
 
virtual void OMNI_PVD_CALL setAttributeShallow (const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle, const OmniPvdAttributeHandle attributeHandle, const uint8_t *data, const uint32_t nbrBytes)=0
 Sets an attribute value.
 
virtual void OMNI_PVD_CALL addToSetAttribute (const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle, const uint8_t handleDepth, const OmniPvdAttributeHandle *attributeHandles, const uint8_t *data, const uint32_t nbrBytes)=0
 Adds an item to a set attribute.
 
virtual void OMNI_PVD_CALL addToSetAttributeShallow (const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle, const OmniPvdAttributeHandle attributeHandle, const uint8_t *data, const uint32_t nbrBytes)=0
 Adds an item to a set attribute.
 
virtual void OMNI_PVD_CALL removeFromSetAttribute (const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle, const uint8_t handleDepth, const OmniPvdAttributeHandle *attributeHandles, const uint8_t *data, const uint32_t nbrBytes)=0
 Removes an item from a set attribute, where the attribute is allowed to be nested.
 
virtual void OMNI_PVD_CALL removeFromSetAttributeShallow (const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle, const OmniPvdAttributeHandle attributeHandle, const uint8_t *data, const uint32_t nbrBytes)=0
 Removes an item from a set attribute.
 
virtual void OMNI_PVD_CALL createObject (const OmniPvdContextHandle contextHandle, const OmniPvdClassHandle classHandle, const OmniPvdObjectHandle objectHandle, const char *objectName)=0
 Creates an object creation event.
 
virtual void OMNI_PVD_CALL destroyObject (const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle)=0
 Creates an object destruction event.
 
virtual void OMNI_PVD_CALL startFrame (const OmniPvdContextHandle contextHandle, const uint64_t timeStamp)=0
 Creates a frame start event.
 
virtual void OMNI_PVD_CALL stopFrame (const OmniPvdContextHandle contextHandle, const uint64_t timeStamp)=0
 Creates a stop frame event.
 

Detailed Description

Used to write debug information to an OmniPvdWriteStream.

Allows the registration of OmniPVD classes and attributes, in a similar fashion to an object oriented language. A registration returns a unique identifier or handle.

Once classes and attributes have been registered, one can create for example object instances of a class and set the values of the attributes of a specific object.

Objects can be grouped by context using the context handle. The context handle is a user-specified handle which is passed to the set functions and object creation and destruction functions.

Each context can have its own notion of time. The current time of a context can be exported with calls to the startFrame and stopFrame functions.

Member Function Documentation

◆ addToSetAttribute()

virtual void OMNI_PVD_CALL OmniPvdWriter::addToSetAttribute ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const uint8_t  handleDepth,
const OmniPvdAttributeHandle *  attributeHandles,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
pure virtual

Adds an item to a set attribute.

Use the attribute handle(s) from the registerSetAttribute() call to add an item to a set attribute.

An array of nested attribute handles is required to uniquely identify the attribute.

Parameters
contextHandleThe user-defined context handle for grouping objects
objectHandleThe user-defined unique handle of the object. E.g. its physical memory address
handleDepthThe number of nested attribute handles requiref to identify the attribute
attributeHandlesThe nested attribute handles needed to identify the attribute
dataThe pointer to the data of the element(s) to remove from the set
nbrBytesThe number of bytes to be written

Implemented in OmniPvdWriterImpl.

◆ addToSetAttributeShallow()

virtual void OMNI_PVD_CALL OmniPvdWriter::addToSetAttributeShallow ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const OmniPvdAttributeHandle  attributeHandle,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
pure virtual

Adds an item to a set attribute.

Use the attribute handle from the registerSetAttribute() call to add an item to a set attribute.

A set attribute is defined like a set in mathematics, where each element must be unique.

The Shallow part of the function indicates that an array of nested attribute handles is not required to uniquely identify the attribute.

Parameters
contextHandleThe user-defined context handle for grouping objects
objectHandleThe user-defined unique handle of the object. E.g. its physical memory address
attributeHandleThe handle from the registerSetAttribute() call
dataThe pointer to the data of the added set item
nbrBytesThe number of bytes to be written
See also
OmniPvdWriter::registerSetAttribute()

Implemented in OmniPvdWriterImpl.

◆ createObject()

virtual void OMNI_PVD_CALL OmniPvdWriter::createObject ( const OmniPvdContextHandle  contextHandle,
const OmniPvdClassHandle  classHandle,
const OmniPvdObjectHandle  objectHandle,
const char *  objectName 
)
pure virtual

Creates an object creation event.

Indicates that an object is created. One can freely choose a context handle for grouping objects.

The class handle is obtained from a registerClass() call. The object handle should be unique, but as it's not tracked by the OmniPVD API, it's important this is set to a valid handle such as the object's physical memory address.

The object name can be freely choosen or not set.

Create about object destruction event by calling destroyObject().

Parameters
contextHandleThe user-defined context handle for grouping objects
classHandleThe handle from the registerClass() call
objectHandleThe user-defined unique handle of the object. E.g. its physical memory address
objectNameThe user-defined name of the object. Can be the empty string
See also
OmniPvdWriter::registerClass()
OmniPvdWriter::destroyObject()

Implemented in OmniPvdWriterImpl.

◆ destroyObject()

virtual void OMNI_PVD_CALL OmniPvdWriter::destroyObject ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle 
)
pure virtual

Creates an object destruction event.

Use this to indicate that an object is destroyed. Use the same user-defined context and object handles as were used in the create object calls.

Parameters
contextHandleThe user-defined context handle for grouping objects
objectHandleThe user-defined unique handle of the object. E.g. its physical memory address
See also
OmniPvdWriter::registerClass()
OmniPvdWriter::createObject()

Implemented in OmniPvdWriterImpl.

◆ getWriteStream()

virtual OmniPvdWriteStream *OMNI_PVD_CALL OmniPvdWriter::getWriteStream ( )
pure virtual

Gets the pointer to the write stream.

Returns
A pointer to the write stream

Implemented in OmniPvdWriterImpl.

◆ registerAttribute()

virtual OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriter::registerAttribute ( const OmniPvdClassHandle  classHandle,
const char *  attributeName,
const OmniPvdAttributeDataType  attributeDataType,
const uint32_t  nbrFields 
)
pure virtual

Registers an attribute.

The class handle is obtained from a previous call to registerClass(). After registering an attribute, one gets an attribute handle which can be used to set data values of an attribute with setAttribute(). All attributes are treated as arrays, even if the attribute has only a single data item. Set nbrFields to 0 to indicate that the array has a variable length.

Parameters
classHandleThe handle from the registerClass() call
attributeNameThe attribute name
attributeDataTypeThe attribute data type // TODO: Change to type OmniPvdDataTypeEnum
nbrFieldsThe number of fields. Set this to 0 to indicate a variable length array
Returns
A unique attribute handle for the registered attribute
See also
OmniPvdWriter::registerClass()
OmniPvdWriter::setAttribute()

Implemented in OmniPvdWriterImpl.

◆ registerClass()

virtual OmniPvdClassHandle OMNI_PVD_CALL OmniPvdWriter::registerClass ( const char *  className,
OmniPvdClassHandle  baseClassHandle = 0 
)
pure virtual

Registers an OmniPVD class.

Returns a unique handle to a class, which can be used to register class attributes and express object lifetimes with the createObject and destroyObject functions. Class inheritance can be described by calling registerClass with a base class handle. Derived classes inherit the attributes of the parent classes.

Parameters
classNameThe class name
baseClassHandleThe handle to the base class. This handle is obtained by pre-registering the base class. Defaults to 0 which means the class has no parent class
Returns
A unique class handle for the registered class
See also
OmniPvdWriter::registerAttribute()
OmniPvdWriter::registerEnumValue()
OmniPvdWriter::registerFlagsAttribute()
OmniPvdWriter::registerClassAttribute()
OmniPvdWriter::registerSetAttribute()
OmniPvdWriter::createObject()

Implemented in OmniPvdWriterImpl.

◆ registerClassAttribute()

virtual OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriter::registerClassAttribute ( const OmniPvdClassHandle  classHandle,
const char *  attributeName,
const OmniPvdClassHandle  classAttributeHandle 
)
pure virtual

Registers an attribute which is a class.

Use this function to indicate that a pre-registered class has an attribute which is a pre-registered class.

The returned attribute handle can be used in setAttribute() to set an object's class attribute.

Parameters
classHandleThe handle from the registerClass() call of the class
attributeNameThe attribute name
classAttributeHandleThe handle from the registerClass() call of the class attribute
Returns
A unique handle for the registered class attribute
See also
OmniPvdWriter::registerClass()
OmniPvdWriter::setAttribute()

Implemented in OmniPvdWriterImpl.

◆ registerEnumValue()

virtual OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriter::registerEnumValue ( const OmniPvdClassHandle  classHandle,
const char *  attributeName,
const uint32_t  value 
)
pure virtual

Registers an enum name and corresponding value for a pre-registered class.

Registering enums happens in two steps. First, registerClass() is called with the name of the enum. This returns a class handle, which is used in a second step for the enum value registration with registerEnumValue(). If an enum has multiple values, registerEnumValue() has to be called with the different values.

Note that enums differ from usual classes because their attributes, the enum values, do not change over time and there is no need to call setAttribute().

Parameters
classHandleThe handle from the registerClass() call
attributeNameThe name of the enum value
valueThe value of the enum value
Returns
A unique attribute handle for the registered enum value
See also
OmniPvdWriter::registerClass()

Implemented in OmniPvdWriterImpl.

◆ registerFlagsAttribute()

virtual OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriter::registerFlagsAttribute ( const OmniPvdClassHandle  classHandle,
const OmniPvdClassHandle  enumClassHandle,
const char *  attributeName 
)
pure virtual

Registers an attribute which is a flag.

Use this function to indicate that a pre-registered class has a flag attribute, i.e., the attribute is a pre-registered enum.

The returned attribute handle can be used in setAttribute() to set an object's flags.

Parameters
classHandleThe handle from the registerClass() call of the class
enumClassHandleThe handle from the registerClass() call of the enum
attributeNameThe attribute name
Returns
A unique attribute handle for the registered flags attribute
See also
OmniPvdWriter::registerClass()
OmniPvdWriter::setAttribute()

Implemented in OmniPvdWriterImpl.

◆ registerSetAttribute()

virtual OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriter::registerSetAttribute ( const OmniPvdClassHandle  classHandle,
const char *  attributeName,
const OmniPvdAttributeDataType  attributeDataType 
)
pure virtual

Registers an attribute which is a set.

A set is a collection of unique items and has a variable size.

The returned attribute handle can be used in calls to addToSetAttribute() and removeFromSetAttribute(), to add an item to and remove it from a set, respectively.

Parameters
classHandleThe handle from the registerClass() call of the class
attributeNameThe attribute name
attributeDataTypeThe data type of items in the set attribute
Returns
A unique handle for the registered set attribute
See also
OmniPvdWriter::registerClass()
OmniPvdWriter::addToSetAttribute()
OmniPvdWriter::removeFromSetAttribute()

Implemented in OmniPvdWriterImpl.

◆ removeFromSetAttribute()

virtual void OMNI_PVD_CALL OmniPvdWriter::removeFromSetAttribute ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const uint8_t  handleDepth,
const OmniPvdAttributeHandle *  attributeHandles,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
pure virtual

Removes an item from a set attribute, where the attribute is allowed to be nested.

A set attribute is defined like a set in mathematics, where each element must be unique.

An array of nested attribute handles is required to uniquely identify the attribute.

Parameters
contextHandleThe user-defined context handle for grouping objects
objectHandleThe user-defined unique handle of the object. E.g. its physical memory address
handleDepthThe number of nested attribute handles require to identify the attribute
attributeHandlesThe attribute handles needed to identify the attribute
dataThe pointer to the data of the element(s) to remove from the set
nbrBytesThe number of bytes to be written

Implemented in OmniPvdWriterImpl.

◆ removeFromSetAttributeShallow()

virtual void OMNI_PVD_CALL OmniPvdWriter::removeFromSetAttributeShallow ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const OmniPvdAttributeHandle  attributeHandle,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
pure virtual

Removes an item from a set attribute.

A set attribute is defined like a set in mathematics, where each element must be unique.

The Shallow part of the function indicates that an array of nested attribute handles is not required to uniquely identify the attribute.

Parameters
contextHandleThe user-defined context handle for grouping objects
objectHandleThe user-defined unique handle of the object. E.g. its physical memory address
attributeHandleThe handle from the registerSetAttribute() call
dataThe pointer to the data of the removed set element(s)
nbrBytesThe number of bytes to be written

Implemented in OmniPvdWriterImpl.

◆ setAttribute()

virtual void OMNI_PVD_CALL OmniPvdWriter::setAttribute ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const uint8_t  handleDepth,
const OmniPvdAttributeHandle *  attributeHandles,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
pure virtual

Sets an attribute value.

Parameters
contextHandleThe user-defined context handle for grouping objects
objectHandleThe user-defined unique handle of the object. E.g. its physical memory address
handleDepthThe number of nested attribute handles requiref to identify the attribute
attributeHandlesThe nested attribute handles needed to identify the attribute
dataThe pointer to the data of the element(s) to remove from the set
nbrBytesThe number of bytes to be written

Implemented in OmniPvdWriterImpl.

◆ setAttributeShallow()

virtual void OMNI_PVD_CALL OmniPvdWriter::setAttributeShallow ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const OmniPvdAttributeHandle  attributeHandle,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
pure virtual

Sets an attribute value.

Use the attribute handle from the registerAttribute() call to set the value of an attribute of an existing object.

Parameters
contextHandleThe user-defined context handle for grouping objects
objectHandleThe user-defined unique handle of the object. E.g. its physical memory address
attributeHandleThe handle from the registerAttribute() call
dataThe pointer to the data
nbrBytesThe number of bytes to be written
See also
OmniPvdWriter::registerAttribute()

Implemented in OmniPvdWriterImpl.

◆ setLogFunction()

virtual void OMNI_PVD_CALL OmniPvdWriter::setLogFunction ( OmniPvdLogFunction  logFunction)
pure virtual

Sets the log function to print the internal debug messages of the OmniPVD API.

Parameters
logFunctionThe function pointer to receive the log messages

Implemented in OmniPvdWriterImpl.

◆ setWriteStream()

virtual void OMNI_PVD_CALL OmniPvdWriter::setWriteStream ( const OmniPvdWriteStream *  writeStream)
pure virtual

Sets the write stream to receive the API command stream.

Parameters
writeStreamThe OmniPvdWriteStream to receive the stream of API calls/notifications

Implemented in OmniPvdWriterImpl.

◆ startFrame()

virtual void OMNI_PVD_CALL OmniPvdWriter::startFrame ( const OmniPvdContextHandle  contextHandle,
const uint64_t  timeStamp 
)
pure virtual

Creates a frame start event.

Time or frames are counted separatly per user-defined context.

Parameters
contextHandleThe user-defined context handle for grouping objects
timeStampThe timestamp of the frame start event

Implemented in OmniPvdWriterImpl.

◆ stopFrame()

virtual void OMNI_PVD_CALL OmniPvdWriter::stopFrame ( const OmniPvdContextHandle  contextHandle,
const uint64_t  timeStamp 
)
pure virtual

Creates a stop frame event.

Time is counted separately per user-defined context.

Parameters
contextHandleThe user-defined context handle for grouping objects
timeStampThe timestamp of the frame stop event

Implemented in OmniPvdWriterImpl.


The documentation for this class was generated from the following file: