25#ifndef SO_MEMORY_OBJECT_H
26#define SO_MEMORY_OBJECT_H
28#include <Inventor/misc/SoRefCounter.h>
29#include <Inventor/STL/map>
30#include <Inventor/SbDataType.h>
31#include <Inventor/threads/SbThreadMutex.h>
35#pragma warning(disable:4251)
157 void setBuffer(
void *buf,
size_t byteSize);
160 void forceSize(
size_t byteSize);
163 uint32_t getId() {
return m_index; }
164 void setId( uint32_t
id );
169 void registerMemObj();
174 void releaseValues();
179 template <
typename T>
void deleteValues(
void *buffer);
184 template <
typename T>
void allocValues(
void*& buffer,
size_t byteSize);
191 static uint32_t index;
193 typedef std::map< uint32_t, SoMemoryObject*> SoMemObjMap;
194 typedef SoMemObjMap::value_type SoMemObjValue;
195 static SoMemObjMap s_memObjMap;
210SoMemoryObject::getBufferObject()
const
Class encoding a data type.
@ UNSIGNED_BYTE
unsigned byte
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable mutex c...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Handle memory bu...
SoMemoryObject()
Default Constructor.
CopyPolicy
SoMemoryObject may be manipulating large amounts of memory.
@ NO_COPY_AND_FREE
Passed buffer used, SoMemoryObject will free.
@ NO_COPY
Passed buffer used, user will delete.
@ NO_COPY_AND_DELETE
Passed buffer used, SoMemoryObject will delete.
@ COPY
Open Inventor will make a copy of the data.
SbDataType getType() const
Returns the type of the encapsulated buffer.
virtual ~SoMemoryObject()
Destructor.
SoMemoryObject(SoBufferObject *bufObj, SbDataType type=SbDataType::UNSIGNED_BYTE, bool owner=true)
Constructor.
void * get() const
Returns a pointer to the encapsulated buffer.
SoMemoryObject(void *buf, size_t byteSize, bool owner=true)
Constructor.
size_t length() const
Returns the size in bytes of the encapsulated buffer.
SoMemoryObject(void *buf, size_t byteSize, SbDataType type, CopyPolicy policy)
Constructor.
Base class for ref-counted objects.