File Geodatabase API
FileGDBAPI::ShapeBuffer Class Reference

A utility class for working with serialized shapes. More...

Inherited by FileGDBAPI::MultiPartShapeBuffer, FileGDBAPI::MultiPatchShapeBuffer, FileGDBAPI::MultiPointShapeBuffer, and FileGDBAPI::PointShapeBuffer.

Public Member Functions

bool Allocate (size_t length)
 Allocates a byte array of the specified size. More...
 
bool IsEmpty (void) const
 Is the ShapeBuffer empty. More...
 
void SetEmpty (void)
 Set the ShapeBuffer empty.
 
fgdbError GetShapeType (ShapeType &shapeType) const
 Gets the shape type from the shape buffer. More...
 
fgdbError GetGeometryType (GeometryType &geometryType) const
 Gets the geometry type which corresponds to the shape type in the shape buffer. More...
 
Constructors and destructors
 ShapeBuffer (size_t length=0)
 The class constructor.
 
virtual ~ShapeBuffer ()
 The class destructor.
 

Static Public Member Functions

static bool HasZs (ShapeType shapeType)
 Does the shape buffer contain Z values. More...
 
static bool HasMs (ShapeType shapeType)
 Does the shape buffer contain Ms. More...
 
static bool HasIDs (ShapeType shapeType)
 Does the shape buffer contain IDs. More...
 
static bool HasCurves (ShapeType shapeType)
 Does the shape buffer contain Curves. More...
 
static bool HasNormals (ShapeType shapeType)
 Does the shape buffer includes Normals. More...
 
static bool HasTextures (ShapeType shapeType)
 Does the shape buffer include Textures. More...
 
static bool HasMaterials (ShapeType shapeType)
 Does the shape buffer include Materials. More...
 
static GeometryType GetGeometryType (ShapeType shapeType)
 Gets the geometry type from a shape type. More...
 

Public Attributes

byte * shapeBuffer
 The underlying byte array.
 
size_t allocatedLength
 The capacity of the byte array.
 
size_t inUseLength
 The number of bytes being used in the array.
 

Detailed Description

A utility class for working with serialized shapes.

Member Function Documentation

bool FileGDBAPI::ShapeBuffer::Allocate ( size_t  length)

Allocates a byte array of the specified size.

Parameters
[in]lengthThe number of bytes to allocate.
Returns
bool Indicates success.
bool FileGDBAPI::ShapeBuffer::IsEmpty ( void  ) const

Is the ShapeBuffer empty.

Returns
bool Indicates if the shape buffer is empty.
fgdbError FileGDBAPI::ShapeBuffer::GetShapeType ( ShapeType &  shapeType) const

Gets the shape type from the shape buffer.

Parameters
[out]shapeTypeThe shape type of the buffer. Shape Type
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::ShapeBuffer::GetGeometryType ( GeometryType &  geometryType) const

Gets the geometry type which corresponds to the shape type in the shape buffer.

Parameters
[out]geometryTypeThe geometry type of the shape. Geometry Type
Returns
Error code indicating whether the method finished successfully.
static bool FileGDBAPI::ShapeBuffer::HasZs ( ShapeType  shapeType)
static

Does the shape buffer contain Z values.

Parameters
[in]shapeTypeThe shape type of the buffer. Shape Type
Returns
bool Indicates if the shape buffer includes Zs.
static bool FileGDBAPI::ShapeBuffer::HasMs ( ShapeType  shapeType)
static

Does the shape buffer contain Ms.

Parameters
[in]shapeTypeThe shape type of the buffer. Shape Type
Returns
bool Indicates if the shape buffer includes Ms.
static bool FileGDBAPI::ShapeBuffer::HasIDs ( ShapeType  shapeType)
static

Does the shape buffer contain IDs.

Parameters
[in]shapeTypeThe shape type of the buffer. Shape Type
Returns
bool Indicates if the shape buffer includes IDs.
static bool FileGDBAPI::ShapeBuffer::HasCurves ( ShapeType  shapeType)
static

Does the shape buffer contain Curves.

Parameters
[in]shapeTypeThe shape type of the buffer. Shape Type
Returns
bool Indicates if the shape buffer includes Curves.
static bool FileGDBAPI::ShapeBuffer::HasNormals ( ShapeType  shapeType)
static

Does the shape buffer includes Normals.

Parameters
[in]shapeTypeThe shape type of the buffer. Shape Type
Returns
bool Indicates if the shape buffer includes Normals.
static bool FileGDBAPI::ShapeBuffer::HasTextures ( ShapeType  shapeType)
static

Does the shape buffer include Textures.

Parameters
[in]shapeTypeThe shape type of the buffer. Shape Type
Returns
bool Indicates if the shape buffer includes Textures
static bool FileGDBAPI::ShapeBuffer::HasMaterials ( ShapeType  shapeType)
static

Does the shape buffer include Materials.

Parameters
[in]shapeTypeThe shape type of the buffer. Shape Type
Returns
bool Indicates if the shape buffer includes Materials.
static GeometryType FileGDBAPI::ShapeBuffer::GetGeometryType ( ShapeType  shapeType)
static

Gets the geometry type from a shape type.

Parameters
[in]shapeTypeThe shape type of the buffer. Shape Type
Returns
GeometryType The geometry type of the shape. Geometry Type