#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 Autodesk 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 | |
bool | IsWriteMode () |
Indicates whether the builder is operating in COUNT mode or in WRITE mode. More... | |
BlobBuffer * | GetBlobBufferToBuildThis () |
For internal use. Check if m_buildingPart == BUILDING_SHALLOW_PART and return this. More... | |
Public Attributes | |
BlobBuffer * | m_blobBuffer |
For internal use. Use BLOB_SET and BLOB_ARRAY instead. More... | |
T * | m_blob |
The blob maintained by this builder. Only modify using the macros listed under DoBuild(). More... | |
Private Member Functions | |
virtual void | DoBuild ()=0 |
Implement this function in any class that derives from BaseBlobBuilder. More... | |
inline implementation | |
T * | Build (BlobHandler< T > &blobHandler) |
This method:
| |
KyUInt32 | ComputeBlobSize () |
Simply Compute BlobSize. More... | |
void | BuildFlatBlob (T &blob) |
Simple way to use DoBuild in case of flat blob (that is, a blob that does not have a BlobArray or BlobRef) More... | |
void | DoBuildAllocatedBlob (BlobBuffer *blobBuffer, T *blob) |
For internal use. Use BLOB_BUILD instead. More... | |
void | DoAllocAndBuildReferencedBlob (BlobBuffer *blobBuffer, BlobRef< T > *blobRef) |
For internal use. Use BUILD_REFERENCED_BLOB instead. More... | |
T * Kaim::BaseBlobBuilder< T >::Build | ( | BlobHandler< T > & | blobHandler | ) |
This method:
void Kaim::BaseBlobBuilder< T >::BuildFlatBlob | ( | T & | blob | ) |
KyUInt32 Kaim::BaseBlobBuilder< T >::ComputeBlobSize | ( | ) |
Simply Compute BlobSize.
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.