#include <baseblobbuilder.h>
BaseBlobBuilder is an abstract base class that builds a blob within a contiguous block of memory.
T | The name of the blob class that this object will handle. |
This class cannot be used directly. If you are building a blob for a class that is supplied with the Gameware Navigation SDK, use the derived BaseBlobBuilder class that corresponds to the blob class you want to build. If you want to use the blob framework to serialize a custom class, derive your own custom class from BaseBlobBuilder<YourBlobClassName>, and implement DoBuild().
Inherits Kaim::NewOverrideBase< Stat >.
Inherited by Kaim::RawDataBlobBuilder< T >.
Public Member Functions | |
T * | Build (BlobHandler< T > &blobHandler) |
void | BuildFlatBlob (T &blob) |
void | DoAllocAndBuildReferencedBlob (BlobBuffer *blobBuffer, BlobRef< T > *blobRef) |
void | DoBuildAllocatedBlob (BlobBuffer *blobBuffer, T *blob) |
BlobBuffer * | GetBlobBufferToBuildThis () |
bool | IsWriteMode () |
Public Attributes | |
T * | m_blob |
BlobBuffer * | m_blobBuffer |
Private Member Functions | |
virtual void | DoBuild ()=0 |
T * Kaim::BaseBlobBuilder< T >::Build | ( | BlobHandler< T > & | blobHandler | ) |
This method:
void Kaim::BaseBlobBuilder< T >::BuildFlatBlob | ( | T & | blob | ) |
void Kaim::BaseBlobBuilder< T >::DoAllocAndBuildReferencedBlob | ( | BlobBuffer * | blobBuffer, |
BlobRef< T > * | blobRef | ||
) |
For internal use. Use BUILD_REFERENCED_BLOB instead.
|
privatepure virtual |
Implement this function in any class that derives from BaseBlobBuilder.
Its responsibility is to set the data for each class member maintained by m_blob. In your implementation, use one of the macros sets supplied for this purpose:
Implemented in Kaim::BoxObstaclesCollectionBlobBuilder, Kaim::NavGraphBlobBuilder, Kaim::GeneratorSectorBlobBuilder, and Kaim::GeneratorSectorListBlobBuilder.
void Kaim::BaseBlobBuilder< T >::DoBuildAllocatedBlob | ( | BlobBuffer * | blobBuffer, |
T * | blob | ||
) |
For internal use. Use BLOB_BUILD instead.
|
inline |
For internal use. Check if m_buildingPart == BUILDING_SHALLOW_PART and return this.
|
inline |
Indicates whether the builder is operating in COUNT mode or in WRITE mode.
This can be used in implementations of DoBuild().
T* Kaim::BaseBlobBuilder< T >::m_blob |
The blob maintained by this builder. Only modify using the macros listed under DoBuild().
BlobBuffer* Kaim::BaseBlobBuilder< T >::m_blobBuffer |
For internal use. Use BLOB_SET and BLOB_ARRAY instead.