gwnavruntime/blob/baseblobbuilder.h File Reference
|
| Kaim |
| The Autodesk Navigation namespace.
|
|
|
#define | BLOB_SET(blob, value) if (this->IsWriteMode()) (blob) = (value) |
| Use this macro only in implementations of BaseBlobBuilder::DoBuild(). More...
|
|
#define | BLOB_ARRAY(blobArray, count) this->GetBlobBufferToBuildThis()->AllocArray(this->IsWriteMode() ? &(blobArray) : nullptr, count) |
| Use this macro only in implementations of BaseBlobBuilder::DoBuild(). More...
|
|
#define | BLOB_ARRAY_COPY(blobArray, src, count) this->GetBlobBufferToBuildThis()->AllocAndCopyArray(this->IsWriteMode() ? &(blobArray) : nullptr, (count) != 0 ? (src) : nullptr, (KyUInt32)(count)) |
| Use this macro only in implementations of BaseBlobBuilder::DoBuild(). More...
|
|
#define | BLOB_ARRAY_COPY_2(blobArray, ky_array) BLOB_ARRAY_COPY(blobArray, ky_array.GetDataPtr(), ky_array.GetSize()) |
| same as BLOB_ARRAY_COPY but uses Kaim::Array as input More...
|
|
#define | BLOB_STRING(str, src) this->GetBlobBufferToBuildThis()->AllocAndCopyArray(this->IsWriteMode() ? &(str) : nullptr, src, (KyUInt32)Kaim::SFstrlen(src) + 1) |
| Use this macro only in implementations of BaseBlobBuilder::DoBuild(). More...
|
|
#define | BLOB_BUILD(blob, builder) builder.DoBuildAllocatedBlob(this->GetBlobBufferToBuildThis(), this->IsWriteMode() ? &(blob) : nullptr) |
| Use this macro only in implementations of BaseBlobBuilder::DoBuild(). More...
|
|
#define | BUILD_REFERENCED_BLOB(blobRef, builder) builder.DoAllocAndBuildReferencedBlob(this->GetBlobBufferToBuildReference(), this->IsWriteMode() ? &(blobRef) : nullptr) |
| Use this macro only in implementations of BaseBlobBuilder::DoBuild(). More...
|
|
#define | COPY_REFERENCED_BLOB(blobRef, srcBlob, srcBlobDeepSize, srcBlobShallowSize) |
| Use this macro only in implementations of BaseBlobBuilder::DoBuild(). More...
|
|
#define BLOB_ARRAY |
( |
|
blobArray, |
|
|
|
count |
|
) |
| this->GetBlobBufferToBuildThis()->AllocArray(this->IsWriteMode() ? &(blobArray) : nullptr, count) |
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Call this macro to reserve a BlobArray member of the blob being built.
- Parameters
-
blobArray | The BlobArray class member of the blob. |
count | The number of elements to reserve in blobArray. In COUNT mode, only the size of the array is counted. In WRITE mode, the array is built and the default constructor of each element is called. |
#define BLOB_ARRAY_COPY |
( |
|
blobArray, |
|
|
|
src, |
|
|
|
count |
|
) |
| this->GetBlobBufferToBuildThis()->AllocAndCopyArray(this->IsWriteMode() ? &(blobArray) : nullptr, (count) != 0 ? (src) : nullptr, (KyUInt32)(count)) |
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Call this macro to reserve a BlobArray member of the blob being built, and to copy its values from another specified BlobArray.
- Parameters
-
blobArray | The BlobArray class member of the blob. |
src | The source of the values to write to blobArray. |
count | The number of elements to reserve in blobArray. In COUNT mode, only the size of the array is counted. In WRITE mode, the array is built and the memory contents of src are copied to blobArray. No constructors are called for the elements in the built array. |
#define BLOB_ARRAY_COPY_2 |
( |
|
blobArray, |
|
|
|
ky_array |
|
) |
| BLOB_ARRAY_COPY(blobArray, ky_array.GetDataPtr(), ky_array.GetSize()) |
same as BLOB_ARRAY_COPY but uses Kaim::Array as input
#define BLOB_BUILD |
( |
|
blob, |
|
|
|
builder |
|
) |
| builder.DoBuildAllocatedBlob(this->GetBlobBufferToBuildThis(), this->IsWriteMode() ? &(blob) : nullptr) |
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Call this macro to build a class member of the blob being built if that class member is itself a blob that needs to be built through its own class of BaseBlobBuilder. This automatically invokes the BaseBlobBuilder::Build() method of builder in order to set up the blob class member.
- Parameters
-
blob | The class member that needs to be built. |
builder | An object that derives from BaseBlobBuilder that will be invoked to build blob. |
#define BLOB_SET |
( |
|
blob, |
|
|
|
value |
|
) |
| if (this->IsWriteMode()) (blob) = (value) |
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Call this macro to set a class member of the blob being built to a specified value.
- Parameters
-
blob | The class member of the blob whose value will be set. |
value | The value to set. In COUNT mode, this macro does nothing. In WRITE mode, it sets the value provided. |
#define BLOB_STRING |
( |
|
str, |
|
|
|
src |
|
) |
| this->GetBlobBufferToBuildThis()->AllocAndCopyArray(this->IsWriteMode() ? &(str) : nullptr, src, (KyUInt32)Kaim::SFstrlen(src) + 1) |
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Call this macro to copy a string value to a member of the blob being built.
- Parameters
-
str | The class member of the blob in which to copy the string. |
src | The string to copy to str. In COUNT mode, only the length of the string is counted. In WRITE mode, the memory contents ofsrc are copied to str. This macro is effectively the same as BLOB_ARRAY_COPY, but automatically calculates the length of the array as strlen(src) + 1. |
#define BUILD_REFERENCED_BLOB |
( |
|
blobRef, |
|
|
|
builder |
|
) |
| builder.DoAllocAndBuildReferencedBlob(this->GetBlobBufferToBuildReference(), this->IsWriteMode() ? &(blobRef) : nullptr) |
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
BUILD_REFERENCED_BLOB must be called after all calls to BLOB_ARRAY, BLOB_ARRAY_COPY, BLOB_STRING, BLOB_BUILD
#define COPY_REFERENCED_BLOB |
( |
|
blobRef, |
|
|
|
srcBlob, |
|
|
|
srcBlobDeepSize, |
|
|
|
srcBlobShallowSize |
|
) |
| |
Value:this->GetBlobBufferToBuildReference()->AllocAndCopyReferencedBlob( \
this->IsWriteMode() ? &(blobRef) : nullptr, srcBlob, srcBlobDeepSize, srcBlobShallowSize)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
COPY_REFERENCED_BLOB must be called after all calls to BLOB_ARRAY, BLOB_ARRAY_COPY, BLOB_STRING, BLOB_BUILD
Go to the source code of this file.