Bullet Collision Detection & Physics Library: btDefaultSerializer Class Reference

Bullet Collision Detection & Physics Library

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
btDefaultSerializer Class Reference

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

`#include <btSerializer.h>`

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

## Public Member Functions
| btDefaultSerializer (int totalSize=0, unsigned char *buffer=0)
virtual | ~btDefaultSerializer ()
void | insertHeader ()
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)
int | getNumChunks () const
const btChunk * | getChunk (int chunkIndex) const
Public Member Functions inherited from btSerializer
virtual | ~btSerializer ()

## Static Public Member Functions
static int | getMemoryDnaSizeInBytes ()
static const char * | getMemoryDna ()

## Public Attributes
btHashMap< btHashPtr, void * > | m_skipPointers

## Protected Member Functions
virtual void * | findPointer (void *oldPtr)
virtual void | writeDNA ()
int | getReverseType (const char *type) const
void | initDNA (const char *bdnaOrg, int dnalen)

## Protected 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
bool | m_ownsBuffer
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 167 of file btSerializer.h.

## Constructor & Destructor Documentation

## § btDefaultSerializer()

btDefaultSerializer::btDefaultSerializer | ( | int | totalSize = `0`,
|  | unsigned char * | buffer = `0`
| ) |  |
| inline

Definition at line 393 of file btSerializer.h.

## § ~btDefaultSerializer()

virtual btDefaultSerializer::~btDefaultSerializer | ( |  | ) |
| inlinevirtual

Definition at line 442 of file btSerializer.h.

## Member Function Documentation

## § allocate()

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

Implements btSerializer.

Definition at line 639 of file btSerializer.h.

## § finalizeChunk()

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

Implements btSerializer.

Definition at line 601 of file btSerializer.h.

## § findNameForPointer()

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

Implements btSerializer.

Definition at line 658 of file btSerializer.h.

## § findPointer()

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

Implements btSerializer.

Definition at line 202 of file btSerializer.h.

## § finishSerialization()

virtual void btDefaultSerializer::finishSerialization | ( |  | ) |
| inlinevirtual

Implements btSerializer.

Definition at line 523 of file btSerializer.h.

## § getBufferPointer()

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

Implements btSerializer.

Definition at line 591 of file btSerializer.h.

## § getChunk()

const btChunk* btDefaultSerializer::getChunk | ( | int | chunkIndex | ) | const
| inlinevirtual

Implements btSerializer.

Definition at line 715 of file btSerializer.h.

## § getCurrentBufferSize()

virtual int btDefaultSerializer::getCurrentBufferSize | ( |  | ) | const
| inlinevirtual

Implements btSerializer.

Definition at line 596 of file btSerializer.h.

## § getMemoryDna()

static const char* btDefaultSerializer::getMemoryDna | ( |  | ) |
| inlinestatic

Definition at line 460 of file btSerializer.h.

## § getMemoryDnaSizeInBytes()

static int btDefaultSerializer::getMemoryDnaSizeInBytes | ( |  | ) |
| inlinestatic

Definition at line 450 of file btSerializer.h.

## § getNumChunks()

int btDefaultSerializer::getNumChunks | ( |  | ) | const
| inlinevirtual

Implements btSerializer.

Definition at line 710 of file btSerializer.h.

## § getReverseType()

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

Definition at line 221 of file btSerializer.h.

## § getSerializationFlags()

virtual int btDefaultSerializer::getSerializationFlags | ( |  | ) | const
| inlinevirtual

Implements btSerializer.

Definition at line 701 of file btSerializer.h.

## § getUniquePointer()

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

Implements btSerializer.

Definition at line 563 of file btSerializer.h.

## § initDNA()

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

was already initialized

Definition at line 232 of file btSerializer.h.

## § insertHeader()

void btDefaultSerializer::insertHeader | ( |  | ) |
| inline

Definition at line 470 of file btSerializer.h.

## § internalAlloc()

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

Definition at line 620 of file btSerializer.h.

## § registerNameForPointer()

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

Implements btSerializer.

Definition at line 667 of file btSerializer.h.

## § serializeName()

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

Implements btSerializer.

Definition at line 672 of file btSerializer.h.

## § setSerializationFlags()

virtual void btDefaultSerializer::setSerializationFlags | ( | int | flags | ) |
| inlinevirtual

Implements btSerializer.

Definition at line 706 of file btSerializer.h.

## § startSerialization()

virtual void btDefaultSerializer::startSerialization | ( |  | ) |
| inlinevirtual

Implements btSerializer.

Definition at line 512 of file btSerializer.h.

## § writeDNA()

virtual void btDefaultSerializer::writeDNA | ( |  | ) |
| inlineprotectedvirtual

Definition at line 214 of file btSerializer.h.

## § writeHeader()

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

Definition at line 476 of file btSerializer.h.

## Member Data Documentation

## § m_buffer

unsigned char* btDefaultSerializer::m_buffer
| protected

Definition at line 188 of file btSerializer.h.

## § m_chunkP

btHashMap<btHashPtr,void*> btDefaultSerializer::m_chunkP
| protected

Definition at line 180 of file btSerializer.h.

## § m_chunkPtrs

btAlignedObjectArray<btChunk*> btDefaultSerializer::m_chunkPtrs
| protected

Definition at line 197 of file btSerializer.h.

## § m_currentSize

int btDefaultSerializer::m_currentSize
| protected

Definition at line 190 of file btSerializer.h.

## § m_dna

void* btDefaultSerializer::m_dna
| protected

Definition at line 191 of file btSerializer.h.

## § m_dnaLength

int btDefaultSerializer::m_dnaLength
| protected

Definition at line 192 of file btSerializer.h.

## § m_nameMap

btHashMap<btHashPtr,const char*> btDefaultSerializer::m_nameMap
| protected

Definition at line 182 of file btSerializer.h.

## § m_ownsBuffer

bool btDefaultSerializer::m_ownsBuffer
| protected

Definition at line 189 of file btSerializer.h.

## § m_serializationFlags

int btDefaultSerializer::m_serializationFlags
| protected

Definition at line 194 of file btSerializer.h.

## § m_skipPointers

btHashMap<btHashPtr,void*> btDefaultSerializer::m_skipPointers

Definition at line 390 of file btSerializer.h.

## § m_totalSize

int btDefaultSerializer::m_totalSize
| protected

Definition at line 187 of file btSerializer.h.

## § m_uniqueIdGenerator

int btDefaultSerializer::m_uniqueIdGenerator
| protected

Definition at line 185 of file btSerializer.h.

## § m_uniquePointers

btHashMap<btHashPtr,btPointerUid> btDefaultSerializer::m_uniquePointers
| protected

Definition at line 184 of file btSerializer.h.

## § mStructReverse

btHashMap<btHashInt, int> btDefaultSerializer::mStructReverse
| protected

Definition at line 175 of file btSerializer.h.

## § mStructs

btAlignedObjectArray<short*> btDefaultSerializer::mStructs
| protected

Definition at line 173 of file btSerializer.h.

## § mTlens

btAlignedObjectArray<short> btDefaultSerializer::mTlens
| protected

Definition at line 174 of file btSerializer.h.

## § mTypeLookup

btHashMap<btHashString,int> btDefaultSerializer::mTypeLookup
| protected

Definition at line 176 of file btSerializer.h.

## § mTypes

btAlignedObjectArray<char*> btDefaultSerializer::mTypes
| protected

Definition at line 172 of file btSerializer.h.

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

- btSerializer.h