Kaim::BoxObstaclesCollectionBlobBuilder Class Reference

Kaim::BoxObstaclesCollectionBlobBuilder Class Reference

#include <boxobstacleblob.h>

Class Description

A type of blob builder that creates a BoxObstaclesCollectionBlob from a list of box BoxObstacles (Kaim::BoxObstacle).

You can use this class to serialize the obstacles to and from a file on disk.

Inherits Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >.

Public Member Functions

BoxObstaclesCollectionBlob * Build (BlobHandler< BoxObstaclesCollectionBlob > &blobHandler)
 
void BuildFlatBlob (BoxObstaclesCollectionBlob &blob)
 
void DoAllocAndBuildReferencedBlob (BlobBuffer *blobBuffer, BlobRef< BoxObstaclesCollectionBlob > *blobRef)
 
virtual void DoBuild ()
 
void DoBuildAllocatedBlob (BlobBuffer *blobBuffer, BoxObstaclesCollectionBlob *blob)
 
BlobBuffer * GetBlobBufferToBuildThis ()
 
bool IsWriteMode ()
 

Public Attributes

BoxObstaclesCollectionBlob * m_blob
 
BlobBuffer * m_blobBuffer
 

Member Function Documentation

BoxObstaclesCollectionBlob * Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >::Build ( BlobHandler< BoxObstaclesCollectionBlob > &  blobHandler)
inherited

This method:

  1. Calls DoBuild() in COUNT mode to determine the amount of memory needed for the blob to be built.

  1. Allocates the amount of memory in the specified BlobHandler.
  2. Calls DoBuild() again, in WRITE mode, to actually build the blob in the buffer allocated by the BlobHandler.
void Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >::BuildFlatBlob ( BoxObstaclesCollectionBlob &  blob)
inherited

Simple way to use DoBuild in case of flat blob (that is, a blob that does not have a BlobArray or BlobRef)

void Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >::DoAllocAndBuildReferencedBlob ( BlobBuffer *  blobBuffer,
BlobRef< BoxObstaclesCollectionBlob > *  blobRef 
)
inherited

For internal use. Use BUILD_REFERENCED_BLOB instead.

virtual void Kaim::BoxObstaclesCollectionBlobBuilder::DoBuild ( )
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:

Implements Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >.

void Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >::DoBuildAllocatedBlob ( BlobBuffer *  blobBuffer,
BoxObstaclesCollectionBlob *  blob 
)
inherited

For internal use. Use BLOB_BUILD instead.

BlobBuffer* Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >::GetBlobBufferToBuildThis ( )
inlineinherited

For internal use. Check if m_buildingPart == BUILDING_SHALLOW_PART and return this.

bool Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >::IsWriteMode ( )
inlineinherited

Indicates whether the builder is operating in COUNT mode or in WRITE mode.

This can be used in implementations of DoBuild().

Member Data Documentation

BoxObstaclesCollectionBlob * Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >::m_blob
inherited

The blob maintained by this builder. Only modify using the macros listed under DoBuild().

BlobBuffer* Kaim::BaseBlobBuilder< BoxObstaclesCollectionBlob >::m_blobBuffer
inherited

For internal use. Use BLOB_SET and BLOB_ARRAY instead.


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