RavEngine
Loading...
Searching...
No Matches
OmniPvdWriterImpl.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#ifndef OMNI_PVD_WRITER_IMPL_H
30#define OMNI_PVD_WRITER_IMPL_H
31
32#include "OmniPvdWriter.h"
33#include "OmniPvdLog.h"
34
36public:
39 void OMNI_PVD_CALL setLogFunction(OmniPvdLogFunction logFunction);
40 void setVersionHelper();
41 void setVersion(const OmniPvdVersionType majorVersion, const OmniPvdVersionType minorVersion, const OmniPvdVersionType patch);
42 void OMNI_PVD_CALL setWriteStream(const OmniPvdWriteStream* stream);
43 OmniPvdWriteStream* OMNI_PVD_CALL getWriteStream();
44
45 OmniPvdClassHandle OMNI_PVD_CALL registerClass(const char* className, OmniPvdClassHandle baseClass);
46 OmniPvdAttributeHandle OMNI_PVD_CALL registerEnumValue(const OmniPvdClassHandle classHandle, const char* attributeName, const uint32_t value);
47 OmniPvdAttributeHandle OMNI_PVD_CALL registerAttribute(const OmniPvdClassHandle classHandle, const char* attributeName, const OmniPvdAttributeDataType attributeDataType, const uint32_t nbrFields);
48 OmniPvdAttributeHandle OMNI_PVD_CALL registerFlagsAttribute(const OmniPvdClassHandle classHandle, const OmniPvdClassHandle enumClassHandle, const char* attributeName);
49 OmniPvdAttributeHandle OMNI_PVD_CALL registerClassAttribute(const OmniPvdClassHandle classHandle, const char* attributeName, const OmniPvdClassHandle classAttributeHandle);
50 OmniPvdAttributeHandle OMNI_PVD_CALL registerSetAttribute(const OmniPvdClassHandle classHandle, const char* attributeName, const OmniPvdAttributeDataType attributeDataType);
51 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);
52 void OMNI_PVD_CALL setAttributeShallow(const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle, const OmniPvdAttributeHandle attributeHandle, const uint8_t *data, const uint32_t nbrBytes);
53
54 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);
55 void OMNI_PVD_CALL addToSetAttributeShallow(const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle, const OmniPvdAttributeHandle attributeHandle, const uint8_t* data, const uint32_t nbrBytes);
56
57 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);
58 void OMNI_PVD_CALL removeFromSetAttributeShallow(const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle, const OmniPvdAttributeHandle attributeHandle, const uint8_t* data, const uint32_t nbrBytes);
59
60 void OMNI_PVD_CALL createObject(const OmniPvdContextHandle contextHandle, const OmniPvdClassHandle classHandle, const OmniPvdObjectHandle objectHandle, const char* objectName);
61 void OMNI_PVD_CALL destroyObject(const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle);
62 void OMNI_PVD_CALL startFrame(const OmniPvdContextHandle contextHandle, const uint64_t timeStamp);
63 void OMNI_PVD_CALL stopFrame(const OmniPvdContextHandle contextHandle, const uint64_t timeStamp);
64
65 bool mIsFirstWrite;
66 OmniPvdLog mLog;
67 OmniPvdWriteStream *mStream;
68 int mLastClassHandle;
69 int mLastAttributeHandle;};
70
71#endif
Definition OmniPvdLog.h:34
Used to abstract a memory write stream.
Definition OmniPvdWriteStream.h:40
Definition OmniPvdWriterImpl.h:35
OmniPvdWriteStream *OMNI_PVD_CALL getWriteStream()
Gets the pointer to the write stream.
Definition OmniPvdWriterImpl.cpp:85
void OMNI_PVD_CALL destroyObject(const OmniPvdContextHandle contextHandle, const OmniPvdObjectHandle objectHandle)
Creates an object destruction event.
Definition OmniPvdWriterImpl.cpp:327
OmniPvdAttributeHandle OMNI_PVD_CALL registerClassAttribute(const OmniPvdClassHandle classHandle, const char *attributeName, const OmniPvdClassHandle classAttributeHandle)
Registers an attribute which is a class.
Definition OmniPvdWriterImpl.cpp:182
void OMNI_PVD_CALL createObject(const OmniPvdContextHandle contextHandle, const OmniPvdClassHandle classHandle, const OmniPvdObjectHandle objectHandle, const char *objectName)
Creates an object creation event.
Definition OmniPvdWriterImpl.cpp:303
OmniPvdAttributeHandle OMNI_PVD_CALL registerFlagsAttribute(const OmniPvdClassHandle classHandle, const OmniPvdClassHandle enumClassHandle, const char *attributeName)
Registers an attribute which is a flag.
Definition OmniPvdWriterImpl.cpp:135
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.
Definition OmniPvdWriterImpl.cpp:297
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.
Definition OmniPvdWriterImpl.cpp:277
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.
Definition OmniPvdWriterImpl.cpp:245
void OMNI_PVD_CALL stopFrame(const OmniPvdContextHandle contextHandle, const uint64_t timeStamp)
Creates a stop frame event.
Definition OmniPvdWriterImpl.cpp:351
OmniPvdAttributeHandle OMNI_PVD_CALL registerAttribute(const OmniPvdClassHandle classHandle, const char *attributeName, const OmniPvdAttributeDataType attributeDataType, const uint32_t nbrFields)
Registers an attribute.
Definition OmniPvdWriterImpl.cpp:111
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.
Definition OmniPvdWriterImpl.cpp:251
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.
Definition OmniPvdWriterImpl.cpp:225
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.
Definition OmniPvdWriterImpl.cpp:160
void OMNI_PVD_CALL setWriteStream(const OmniPvdWriteStream *stream)
Sets the write stream to receive the API command stream.
Definition OmniPvdWriterImpl.cpp:79
void OMNI_PVD_CALL startFrame(const OmniPvdContextHandle contextHandle, const uint64_t timeStamp)
Creates a frame start event.
Definition OmniPvdWriterImpl.cpp:339
void OMNI_PVD_CALL setLogFunction(OmniPvdLogFunction logFunction)
Sets the log function to print the internal debug messages of the OmniPVD API.
Definition OmniPvdWriterImpl.cpp:45
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.
Definition OmniPvdWriterImpl.cpp:271
OmniPvdAttributeHandle OMNI_PVD_CALL registerSetAttribute(const OmniPvdClassHandle classHandle, const char *attributeName, const OmniPvdAttributeDataType attributeDataType)
Registers an attribute which is a set.
Definition OmniPvdWriterImpl.cpp:203
OmniPvdClassHandle OMNI_PVD_CALL registerClass(const char *className, OmniPvdClassHandle baseClass)
Registers an OmniPVD class.
Definition OmniPvdWriterImpl.cpp:90
Used to write debug information to an OmniPvdWriteStream.
Definition OmniPvdWriter.h:47