Blender V2.61 - r43446
|
#include <btSerializer.h>
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 btChunk * | allocate (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) |
Protected Member Functions | |
virtual void * | findPointer (void *oldPtr) |
void | writeDNA () |
int | getReverseType (const char *type) const |
void | initDNA (const char *bdnaOrg, int dnalen) |
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.
btDefaultSerializer::btDefaultSerializer | ( | int | totalSize = 0 | ) | [inline] |
Definition at line 377 of file btSerializer.h.
References btAlignedAlloc, btAssert, initDNA(), sBulletDNAlen, sBulletDNAlen64, sBulletDNAstr, and sBulletDNAstr64.
virtual btDefaultSerializer::~btDefaultSerializer | ( | ) | [inline, virtual] |
Definition at line 417 of file btSerializer.h.
References btAlignedFree.
virtual btChunk* btDefaultSerializer::allocate | ( | size_t | size, |
int | numElements | ||
) | [inline, virtual] |
Implements btSerializer.
Definition at line 579 of file btSerializer.h.
References data, internalAlloc(), btChunk::m_chunkCode, and btAlignedObjectArray< T >::push_back().
Referenced by serializeName(), and writeDNA().
virtual void btDefaultSerializer::finalizeChunk | ( | btChunk * | chunk, |
const char * | structType, | ||
int | chunkCode, | ||
void * | oldPtr | ||
) | [inline, virtual] |
Implements btSerializer.
Definition at line 541 of file btSerializer.h.
References BT_SERIALIZE_NO_DUPLICATE_ASSERT, btAssert, findPointer(), getReverseType(), getUniquePointer(), btHashMap< Key, Value >::insert(), btChunk::m_chunkCode, btChunk::m_dna_nr, and btChunk::m_oldPtr.
Referenced by serializeName(), and writeDNA().
virtual const char* btDefaultSerializer::findNameForPointer | ( | const void * | ptr | ) | const [inline, virtual] |
Implements btSerializer.
Definition at line 598 of file btSerializer.h.
References btHashMap< Key, Value >::find().
virtual void* btDefaultSerializer::findPointer | ( | void * | oldPtr | ) | [inline, protected, virtual] |
Implements btSerializer.
Definition at line 170 of file btSerializer.h.
References btHashMap< Key, Value >::find().
Referenced by finalizeChunk(), and serializeName().
virtual void btDefaultSerializer::finishSerialization | ( | ) | [inline, virtual] |
Implements btSerializer.
Definition at line 472 of file btSerializer.h.
References BT_HEADER_LENGTH, btAlignedAlloc, btAlignedFree, btAlignedObjectArray< T >::clear(), btHashMap< Key, Value >::clear(), i, btAlignedObjectArray< T >::size(), writeDNA(), and writeHeader().
virtual const unsigned char* btDefaultSerializer::getBufferPointer | ( | ) | const [inline, virtual] |
Implements btSerializer.
Definition at line 531 of file btSerializer.h.
Referenced by CcdPhysicsEnvironment::exportFile().
virtual int btDefaultSerializer::getCurrentBufferSize | ( | ) | const [inline, virtual] |
Implements btSerializer.
Definition at line 536 of file btSerializer.h.
Referenced by CcdPhysicsEnvironment::exportFile().
int btDefaultSerializer::getReverseType | ( | const char * | type | ) | const [inline, protected] |
Definition at line 189 of file btSerializer.h.
References btHashMap< Key, Value >::find().
Referenced by finalizeChunk().
virtual int btDefaultSerializer::getSerializationFlags | ( | ) | const [inline, virtual] |
Implements btSerializer.
Definition at line 641 of file btSerializer.h.
virtual void* btDefaultSerializer::getUniquePointer | ( | void * | oldPtr | ) | [inline, virtual] |
Implements btSerializer.
Definition at line 511 of file btSerializer.h.
References btHashMap< Key, Value >::find(), btHashMap< Key, Value >::insert(), btPointerUid::m_ptr, and btPointerUid::m_uniqueIds.
Referenced by finalizeChunk().
void btDefaultSerializer::initDNA | ( | const char * | bdnaOrg, |
int | dnalen | ||
) | [inline, protected] |
was already initialized
Definition at line 200 of file btSerializer.h.
References assert, btAlignedObjectArray< T >::at(), btAlignedAlloc, btSwapEndian(), i, btHashMap< Key, Value >::insert(), len(), btAlignedObjectArray< T >::push_back(), and btAlignedObjectArray< T >::size().
Referenced by btDefaultSerializer().
virtual unsigned char* btDefaultSerializer::internalAlloc | ( | size_t | size | ) | [inline, virtual] |
Definition at line 560 of file btSerializer.h.
References btAlignedAlloc, and btAssert.
Referenced by allocate(), and startSerialization().
virtual void btDefaultSerializer::registerNameForPointer | ( | const void * | ptr, |
const char * | name | ||
) | [inline, virtual] |
Implements btSerializer.
Definition at line 607 of file btSerializer.h.
References btHashMap< Key, Value >::insert().
Referenced by CcdPhysicsEnvironment::exportFile().
virtual void btDefaultSerializer::serializeName | ( | const char * | name | ) | [inline, virtual] |
Implements btSerializer.
Definition at line 612 of file btSerializer.h.
References allocate(), BT_ARRAY_CODE, btStrLen(), finalizeChunk(), findPointer(), i, len(), and btChunk::m_oldPtr.
virtual void btDefaultSerializer::setSerializationFlags | ( | int | flags | ) | [inline, virtual] |
Implements btSerializer.
Definition at line 646 of file btSerializer.h.
virtual void btDefaultSerializer::startSerialization | ( | ) | [inline, virtual] |
Implements btSerializer.
Definition at line 461 of file btSerializer.h.
References BT_HEADER_LENGTH, internalAlloc(), and writeHeader().
void btDefaultSerializer::writeDNA | ( | ) | [inline, protected] |
Definition at line 182 of file btSerializer.h.
References allocate(), BT_DNA_CODE, finalizeChunk(), and btChunk::m_oldPtr.
Referenced by finishSerialization().
void btDefaultSerializer::writeHeader | ( | unsigned char * | buffer | ) | const [inline] |
Definition at line 425 of file btSerializer.h.
Referenced by finishSerialization(), and startSerialization().