Kaim::GeneratorSectorBlobBuilder Class Reference

Kaim::GeneratorSectorBlobBuilder Class Reference

#include <generatorsectorconfigblob.h>

Class Description

Used to serialize GeneratorInputOutput.

Inherits Kaim::BaseBlobBuilder< GeneratorSectorBlob >.

Public Member Functions

bool IsWriteMode ()
 Indicates whether the builder is operating in COUNT mode or in WRITE mode. More...
 
GeneratorSectorBlobBuild (BlobHandler< GeneratorSectorBlob > &blobHandler)
 This method:

  1. Calls DoBuild() in COUNT mode to determine the amount of memory needed for the blob to be built.
More...
 
KyUInt32 ComputeBlobSize ()
 Simply Compute BlobSize. More...
 
void BuildFlatBlob (GeneratorSectorBlob &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, GeneratorSectorBlob *blob)
 For internal use. Use BLOB_BUILD instead. More...
 
void DoAllocAndBuildReferencedBlob (BlobBuffer *blobBuffer, BlobRef< GeneratorSectorBlob > *blobRef)
 For internal use. Use BUILD_REFERENCED_BLOB instead. 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...
 
GeneratorSectorBlobm_blob
 The blob maintained by this builder. Only modify using the macros listed under DoBuild(). More...
 

Private Member Functions

virtual void DoBuild ()
 Implement this function in any class that derives from BaseBlobBuilder. More...
 

Member Function Documentation

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< GeneratorSectorBlob >::BuildFlatBlob ( GeneratorSectorBlob blob)
inherited

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

KyUInt32 Kaim::BaseBlobBuilder< GeneratorSectorBlob >::ComputeBlobSize ( )
inherited

Simply Compute BlobSize.

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

For internal use. Use BUILD_REFERENCED_BLOB instead.

void Kaim::GeneratorSectorBlobBuilder::DoBuild ( )
privatevirtual

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< GeneratorSectorBlob >.

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

For internal use. Use BLOB_BUILD instead.

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

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

bool Kaim::BaseBlobBuilder< GeneratorSectorBlob >::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

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

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

For internal use. Use BLOB_SET and BLOB_ARRAY instead.


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