RavEngine
Loading...
Searching...
No Matches
OmniPvdWriterImpl Class Reference
Inheritance diagram for OmniPvdWriterImpl:
[legend]
Collaboration diagram for OmniPvdWriterImpl:
[legend]

Public Member Functions

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

Public Attributes

bool mIsFirstWrite
 
OmniPvdLog mLog
 
OmniPvdWriteStream * mStream
 
int mLastClassHandle
 
int mLastAttributeHandle
 

Member Function Documentation

◆ addToSetAttribute()

void OMNI_PVD_CALL OmniPvdWriterImpl::addToSetAttribute ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const uint8_t  handleDepth,
const OmniPvdAttributeHandle *  attributeHandles,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
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

Implements OmniPvdWriter.

◆ addToSetAttributeShallow()

void OMNI_PVD_CALL OmniPvdWriterImpl::addToSetAttributeShallow ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const OmniPvdAttributeHandle  attributeHandle,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
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()

Implements OmniPvdWriter.

◆ createObject()

void OMNI_PVD_CALL OmniPvdWriterImpl::createObject ( const OmniPvdContextHandle  contextHandle,
const OmniPvdClassHandle  classHandle,
const OmniPvdObjectHandle  objectHandle,
const char *  objectName 
)
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()

Implements OmniPvdWriter.

◆ destroyObject()

void OMNI_PVD_CALL OmniPvdWriterImpl::destroyObject ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle 
)
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()

Implements OmniPvdWriter.

◆ getWriteStream()

OmniPvdWriteStream *OMNI_PVD_CALL OmniPvdWriterImpl::getWriteStream ( )
virtual

Gets the pointer to the write stream.

Returns
A pointer to the write stream

Implements OmniPvdWriter.

◆ registerAttribute()

OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriterImpl::registerAttribute ( const OmniPvdClassHandle  classHandle,
const char *  attributeName,
const OmniPvdAttributeDataType  attributeDataType,
const uint32_t  nbrFields 
)
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()

Implements OmniPvdWriter.

◆ registerClass()

OmniPvdClassHandle OMNI_PVD_CALL OmniPvdWriterImpl::registerClass ( const char *  className,
OmniPvdClassHandle  baseClassHandle 
)
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()

Implements OmniPvdWriter.

◆ registerClassAttribute()

OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriterImpl::registerClassAttribute ( const OmniPvdClassHandle  classHandle,
const char *  attributeName,
const OmniPvdClassHandle  classAttributeHandle 
)
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()

Implements OmniPvdWriter.

◆ registerEnumValue()

OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriterImpl::registerEnumValue ( const OmniPvdClassHandle  classHandle,
const char *  attributeName,
const uint32_t  value 
)
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()

Implements OmniPvdWriter.

◆ registerFlagsAttribute()

OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriterImpl::registerFlagsAttribute ( const OmniPvdClassHandle  classHandle,
const OmniPvdClassHandle  enumClassHandle,
const char *  attributeName 
)
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()

Implements OmniPvdWriter.

◆ registerSetAttribute()

OmniPvdAttributeHandle OMNI_PVD_CALL OmniPvdWriterImpl::registerSetAttribute ( const OmniPvdClassHandle  classHandle,
const char *  attributeName,
const OmniPvdAttributeDataType  attributeDataType 
)
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()

Implements OmniPvdWriter.

◆ removeFromSetAttribute()

void OMNI_PVD_CALL OmniPvdWriterImpl::removeFromSetAttribute ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const uint8_t  handleDepth,
const OmniPvdAttributeHandle *  attributeHandles,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
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

Implements OmniPvdWriter.

◆ removeFromSetAttributeShallow()

void OMNI_PVD_CALL OmniPvdWriterImpl::removeFromSetAttributeShallow ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const OmniPvdAttributeHandle  attributeHandle,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
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

Implements OmniPvdWriter.

◆ setAttribute()

void OMNI_PVD_CALL OmniPvdWriterImpl::setAttribute ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const uint8_t  handleDepth,
const OmniPvdAttributeHandle *  attributeHandles,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
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

Implements OmniPvdWriter.

◆ setAttributeShallow()

void OMNI_PVD_CALL OmniPvdWriterImpl::setAttributeShallow ( const OmniPvdContextHandle  contextHandle,
const OmniPvdObjectHandle  objectHandle,
const OmniPvdAttributeHandle  attributeHandle,
const uint8_t *  data,
const uint32_t  nbrBytes 
)
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()

Implements OmniPvdWriter.

◆ setLogFunction()

void OMNI_PVD_CALL OmniPvdWriterImpl::setLogFunction ( OmniPvdLogFunction  logFunction)
virtual

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

Parameters
logFunctionThe function pointer to receive the log messages

Implements OmniPvdWriter.

◆ setWriteStream()

void OMNI_PVD_CALL OmniPvdWriterImpl::setWriteStream ( const OmniPvdWriteStream *  writeStream)
virtual

Sets the write stream to receive the API command stream.

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

Implements OmniPvdWriter.

◆ startFrame()

void OMNI_PVD_CALL OmniPvdWriterImpl::startFrame ( const OmniPvdContextHandle  contextHandle,
const uint64_t  timeStamp 
)
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

Implements OmniPvdWriter.

◆ stopFrame()

void OMNI_PVD_CALL OmniPvdWriterImpl::stopFrame ( const OmniPvdContextHandle  contextHandle,
const uint64_t  timeStamp 
)
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

Implements OmniPvdWriter.


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