Bullet Collision Detection & Physics Library
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
btDefaultSerializer Class Reference

The btDefaultSerializer is the main Bullet serialization class. More...

#include <btSerializer.h>

Inheritance diagram for btDefaultSerializer:
Inheritance graph
[legend]
Collaboration diagram for btDefaultSerializer:
Collaboration graph
[legend]

Public Member Functions

 btDefaultSerializer (int totalSize=0)
 
virtual ~btDefaultSerializer ()
 
void writeHeader (unsigned char *buffer) const
 
virtual void startSerialization ()
 
virtual void finishSerialization ()
 
virtual void * getUniquePointer (void *oldPtr)
 
virtual const unsigned char * getBufferPointer () const
 
virtual int getCurrentBufferSize () const
 
virtual void finalizeChunk (btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)
 
virtual unsigned char * internalAlloc (size_t size)
 
virtual btChunkallocate (size_t size, int numElements)
 
virtual const char * findNameForPointer (const void *ptr) const
 
virtual void registerNameForPointer (const void *ptr, const char *name)
 
virtual void serializeName (const char *name)
 
virtual int getSerializationFlags () const
 
virtual void setSerializationFlags (int flags)
 
- Public Member Functions inherited from btSerializer
virtual ~btSerializer ()
 

Protected Member Functions

virtual void * findPointer (void *oldPtr)
 
void writeDNA ()
 
int getReverseType (const char *type) const
 
void initDNA (const char *bdnaOrg, int dnalen)
 

Private Attributes

btAlignedObjectArray< char * > mTypes
 
btAlignedObjectArray< short * > mStructs
 
btAlignedObjectArray< short > mTlens
 
btHashMap< btHashInt, int > mStructReverse
 
btHashMap< btHashString, int > mTypeLookup
 
btHashMap< btHashPtr, void * > m_chunkP
 
btHashMap< btHashPtr, const
char * > 
m_nameMap
 
btHashMap< btHashPtr,
btPointerUid
m_uniquePointers
 
int m_uniqueIdGenerator
 
int m_totalSize
 
unsigned char * m_buffer
 
int m_currentSize
 
void * m_dna
 
int m_dnaLength
 
int m_serializationFlags
 
btAlignedObjectArray< btChunk * > m_chunkPtrs
 

Detailed Description

The btDefaultSerializer is the main Bullet serialization class.

The constructor takes an optional argument for backwards compatibility, it is recommended to leave this empty/zero.

Definition at line 139 of file btSerializer.h.

Constructor & Destructor Documentation

btDefaultSerializer::btDefaultSerializer ( int  totalSize = 0)
inline

Definition at line 361 of file btSerializer.h.

virtual btDefaultSerializer::~btDefaultSerializer ( )
inlinevirtual

Definition at line 401 of file btSerializer.h.

Member Function Documentation

virtual btChunk* btDefaultSerializer::allocate ( size_t  size,
int  numElements 
)
inlinevirtual

Implements btSerializer.

Definition at line 563 of file btSerializer.h.

virtual void btDefaultSerializer::finalizeChunk ( btChunk chunk,
const char *  structType,
int  chunkCode,
void *  oldPtr 
)
inlinevirtual

Implements btSerializer.

Definition at line 525 of file btSerializer.h.

virtual const char* btDefaultSerializer::findNameForPointer ( const void *  ptr) const
inlinevirtual

Implements btSerializer.

Definition at line 582 of file btSerializer.h.

virtual void* btDefaultSerializer::findPointer ( void *  oldPtr)
inlineprotectedvirtual

Implements btSerializer.

Definition at line 170 of file btSerializer.h.

virtual void btDefaultSerializer::finishSerialization ( )
inlinevirtual

Implements btSerializer.

Definition at line 456 of file btSerializer.h.

virtual const unsigned char* btDefaultSerializer::getBufferPointer ( ) const
inlinevirtual

Implements btSerializer.

Definition at line 515 of file btSerializer.h.

virtual int btDefaultSerializer::getCurrentBufferSize ( ) const
inlinevirtual

Implements btSerializer.

Definition at line 520 of file btSerializer.h.

int btDefaultSerializer::getReverseType ( const char *  type) const
inlineprotected

Definition at line 189 of file btSerializer.h.

virtual int btDefaultSerializer::getSerializationFlags ( ) const
inlinevirtual

Implements btSerializer.

Definition at line 625 of file btSerializer.h.

virtual void* btDefaultSerializer::getUniquePointer ( void *  oldPtr)
inlinevirtual

Implements btSerializer.

Definition at line 495 of file btSerializer.h.

void btDefaultSerializer::initDNA ( const char *  bdnaOrg,
int  dnalen 
)
inlineprotected

was already initialized

Definition at line 200 of file btSerializer.h.

virtual unsigned char* btDefaultSerializer::internalAlloc ( size_t  size)
inlinevirtual

Definition at line 544 of file btSerializer.h.

virtual void btDefaultSerializer::registerNameForPointer ( const void *  ptr,
const char *  name 
)
inlinevirtual

Implements btSerializer.

Definition at line 591 of file btSerializer.h.

virtual void btDefaultSerializer::serializeName ( const char *  name)
inlinevirtual

Implements btSerializer.

Definition at line 596 of file btSerializer.h.

virtual void btDefaultSerializer::setSerializationFlags ( int  flags)
inlinevirtual

Implements btSerializer.

Definition at line 630 of file btSerializer.h.

virtual void btDefaultSerializer::startSerialization ( )
inlinevirtual

Implements btSerializer.

Definition at line 445 of file btSerializer.h.

void btDefaultSerializer::writeDNA ( )
inlineprotected

Definition at line 182 of file btSerializer.h.

void btDefaultSerializer::writeHeader ( unsigned char *  buffer) const
inline

Definition at line 409 of file btSerializer.h.

Member Data Documentation

unsigned char* btDefaultSerializer::m_buffer
private

Definition at line 158 of file btSerializer.h.

btHashMap<btHashPtr,void*> btDefaultSerializer::m_chunkP
private

Definition at line 150 of file btSerializer.h.

btAlignedObjectArray<btChunk*> btDefaultSerializer::m_chunkPtrs
private

Definition at line 166 of file btSerializer.h.

int btDefaultSerializer::m_currentSize
private

Definition at line 159 of file btSerializer.h.

void* btDefaultSerializer::m_dna
private

Definition at line 160 of file btSerializer.h.

int btDefaultSerializer::m_dnaLength
private

Definition at line 161 of file btSerializer.h.

btHashMap<btHashPtr,const char*> btDefaultSerializer::m_nameMap
private

Definition at line 152 of file btSerializer.h.

int btDefaultSerializer::m_serializationFlags
private

Definition at line 163 of file btSerializer.h.

int btDefaultSerializer::m_totalSize
private

Definition at line 157 of file btSerializer.h.

int btDefaultSerializer::m_uniqueIdGenerator
private

Definition at line 155 of file btSerializer.h.

btHashMap<btHashPtr,btPointerUid> btDefaultSerializer::m_uniquePointers
private

Definition at line 154 of file btSerializer.h.

btHashMap<btHashInt, int> btDefaultSerializer::mStructReverse
private

Definition at line 146 of file btSerializer.h.

btAlignedObjectArray<short*> btDefaultSerializer::mStructs
private

Definition at line 144 of file btSerializer.h.

btAlignedObjectArray<short> btDefaultSerializer::mTlens
private

Definition at line 145 of file btSerializer.h.

btHashMap<btHashString,int> btDefaultSerializer::mTypeLookup
private

Definition at line 147 of file btSerializer.h.

btAlignedObjectArray<char*> btDefaultSerializer::mTypes
private

Definition at line 143 of file btSerializer.h.


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