BFeatureCollection Class Reference

#include <BFeatureCollection.h>

Inheritance diagram for BFeatureCollection:

Inheritance graph
[legend]

List of all members.


Detailed Description

A collection of BFeature objects.

Public Member Functions

virtual void Add (const BFeatureCollection &features)=0
 Appends the BFeature objects in the specified collection to this collection.
virtual void Add (const BFeaturePtr &feature)=0
 Adds a BFeature to this collection.
virtual void Add (const BFeature &feature)=0
 Copies the specified BFeature and adds it to this collection.
 BFeatureCollection (const BFeatureCollection &feats)
 Copy constructor.
 BFeatureCollection ()
 Default constructor.
virtual void Clear (void)
 Removes all BFeature objects from this collection.
virtual const BFeaturePtr GetAt (size_t index, bool inclCachedAttrs=true) const =0
 Gets the BFeature at the specified index in this collection.
virtual BFeaturePtr GetAt (size_t index, bool inclCachedAttrs=true)=0
 Gets the BFeature at the specified index in this collection.
virtual size_t GetCount (void) const =0
 Gets the number of BFeature objects in this collection.
BGeometryCountsGetGeometryCounts (void)
 Get the count of geometry types in this collection.
const BGeometryCountsGetGeometryCounts (void) const
 Get the count of geometry types in this collection.
const BRectGetMBR (void) const
 Gets the minimum bounding rectangle for all BFeature objects in this collection.
EGeometryClass GetSingleGeometryClass (void) const
 Get the geometry class that limits this collection.
bool Is3d (void) const
 Gets the flag indicating whether or not this collection contains three- dimensional BFeature objects.
bool IsSingleGeometryClass (void) const
 Indicates whether or not the contents of this collection are limited to a single geometry class.
virtual void Release (size_t index)=0
 Releases the memory associated with a BFeature.
virtual void Remove (size_t index)=0
 Removes a BFeature from this collection.
virtual void Reserve (size_t size)=0
 Reserves space for the requested number of elements in this collection.
void Set3d (bool is3d)
 Sets the flag indicating whether or not this collection contains three- dimensional BFeature objects.
void SetSingleGeometryClass (EGeometryClass gc)
 Set the geometry class that will be used to limit this collection.
virtual void Transform (const BTransform &cst)=0
 Transforms the geometry of each BFeature in this collection to a different coordinate system.
virtual void TransformReverse (const BTransform &cst)=0
 Transforms the geometry of each BFeature in this collection to a different coordinate system using the "reverse" of the BTransform.
virtual ~BFeatureCollection ()
 Destructor.

Protected Member Functions

void CheckGeometryClass (const BFeaturePtr &feature)
 Determines whether or not the input feature can be added to the collection based on its associated geometry class.
void CheckGeometryClass (const BFeature &feature)
 Determines whether or not the input feature can be added to the collection based on its associated geometry class.
virtual BRect ComputeMBR (void) const =0
 Computes the current minimum bounding rectangle for all BFeature objects in this collection.
void SetChanged (bool val=true)
 Sets the indicator of whether or not this collection has changed since the last time the MBR was calculated.

Protected Attributes

EGeometryClass m_geoClass
 Only features that contain geometries with this class can be added to this collection.
BGeometryCounts m_geoCounts
 The count of each type geometry type in this collection.
bool m_is3d
 Indicates whether or not this collection contains three-dimensional BFeature objects.
bool m_isChanged
 Indicates if this collection has changed since the last time the MBR was calculated.
BRect m_mbr
 The minimum bounding rectangle for the BFeature objects in the collection.

Constructor & Destructor Documentation

BFeatureCollection (  )  [inline]

Default constructor.

This constructor will create an empty collection.

BFeatureCollection ( const BFeatureCollection feats  )  [inline]

Copy constructor.

Parameters:
feats The BFeatureCollection object to copy.

virtual ~BFeatureCollection (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual void Add ( const BFeatureCollection features  )  [pure virtual]

Appends the BFeature objects in the specified collection to this collection.

Parameters:
features The collection of BFeature objects to be added.

Implemented in BFeatures, and BFeaturesOnDisk.

virtual void Add ( const BFeaturePtr feature  )  [pure virtual]

Adds a BFeature to this collection.

Parameters:
feature Pointer to the feature to be added.

Implemented in BFeatures, and BFeaturesOnDisk.

virtual void Add ( const BFeature feature  )  [pure virtual]

Copies the specified BFeature and adds it to this collection.

Parameters:
feature The BFeature to be copied and added to this collection.

Implemented in BFeatures, and BFeaturesOnDisk.

void CheckGeometryClass ( const BFeaturePtr feature  )  [inline, protected]

Determines whether or not the input feature can be added to the collection based on its associated geometry class.

Parameters:
feature The BFeature object to be checked
Exceptions:
BUnknownGeometryException This exception will be thrown if the geometry associated with the specified feature is not of the correct class.

void CheckGeometryClass ( const BFeature feature  )  [inline, protected]

Determines whether or not the input feature can be added to the collection based on its associated geometry class.

Parameters:
feature The BFeature object to be checked
Exceptions:
BUnknownGeometryException This exception will be thrown if the geometry associated with the specified feature is not of the correct class.

virtual void Clear ( void   )  [inline, virtual]

Removes all BFeature objects from this collection.

Derived classes should call Clear method in the base class implementation.

Reimplemented in BFeatures, and BFeaturesOnDisk.

virtual BRect ComputeMBR ( void   )  const [protected, pure virtual]

Computes the current minimum bounding rectangle for all BFeature objects in this collection.

Returns:
The minimum bounding rectangle.

Implemented in BFeatures, and BFeaturesOnDisk.

virtual const BFeaturePtr GetAt ( size_t  index,
bool  inclCachedAttrs = true 
) const [pure virtual]

Gets the BFeature at the specified index in this collection.

Parameters:
index The zero-based index of the desired BFeature.
inclCachedAttrs Indicates whether the returned feature will contain attributes. This applies only when the features are stored in a disk cache, and can be used to improve performance in applications where attributes are not needed. If the features are stored in memory, this has no effect.
Returns:
The BFeature at the specified index.
Exceptions:
BIndexOutOfBoundsException This exception will be thrown if the specified index does not correspond to a BFeature in this collection.

Implemented in BFeatures, and BFeaturesOnDisk.

virtual BFeaturePtr GetAt ( size_t  index,
bool  inclCachedAttrs = true 
) [pure virtual]

Gets the BFeature at the specified index in this collection.

Parameters:
index The zero-based index of the desired BFeature.
Returns:
The BFeature at the specified index.
Parameters:
inclCachedAttrs Indicates whether the returned feature will contain attributes. This applies only when the features are stored in a disk cache, and can be used to improve performance in applications where attributes are not needed. If the features are stored in memory, this has no effect.
Exceptions:
BIndexOutOfBoundsException This exception will be thrown if the specified index does not correspond to a BFeature in this collection.

Implemented in BFeatures, and BFeaturesOnDisk.

virtual size_t GetCount ( void   )  const [pure virtual]

Gets the number of BFeature objects in this collection.

Returns:
The number of BFeature objects in this collection.

Implemented in BFeatures, and BFeaturesOnDisk.

BGeometryCounts& GetGeometryCounts ( void   )  [inline]

Get the count of geometry types in this collection.

Returns:
The count of all geometry types in this collection.

const BGeometryCounts& GetGeometryCounts ( void   )  const [inline]

Get the count of geometry types in this collection.

Returns:
The count of all geometry types in this collection.

const BRect& GetMBR ( void   )  const [inline]

Gets the minimum bounding rectangle for all BFeature objects in this collection.

Returns:
The minimum bounding rectangle.

EGeometryClass GetSingleGeometryClass ( void   )  const [inline]

Get the geometry class that limits this collection.

Returns:
All geometries added to this collection must have this geometry class.

bool Is3d ( void   )  const [inline]

Gets the flag indicating whether or not this collection contains three- dimensional BFeature objects.

Returns:
True if this collection contains 3d BFeature objects and false otherwise.

bool IsSingleGeometryClass ( void   )  const [inline]

Indicates whether or not the contents of this collection are limited to a single geometry class.

Returns:
True if the collection is limited to a single geometry class, false otherwise

virtual void Release ( size_t  index  )  [pure virtual]

Releases the memory associated with a BFeature.

Parameters:
index The zero-based index of the BFeature to be released.
Exceptions:
BIndexOutOfBoundsException This exception will be thrown if the specified index does not correspond to a BFeature in this collection.

Implemented in BFeatures, and BFeaturesOnDisk.

virtual void Remove ( size_t  index  )  [pure virtual]

Removes a BFeature from this collection.

Parameters:
index The zero-based index of the BFeature to be removed.
Exceptions:
BIndexOutOfBoundsException This exception will be thrown if the specified index does not correspond to a BFeature in this collection.

Implemented in BFeatures, and BFeaturesOnDisk.

virtual void Reserve ( size_t  size  )  [pure virtual]

Reserves space for the requested number of elements in this collection.

Parameters:
size The number of elements for which space shall be reserved.

Implemented in BFeatures, and BFeaturesOnDisk.

void Set3d ( bool  is3d  )  [inline]

Sets the flag indicating whether or not this collection contains three- dimensional BFeature objects.

Parameters:
is3d A value of true indicates that this collection contains 3d BFeature objects, and an argument of false indicates that this collection does not contain any 3d BFeature objects.

void SetChanged ( bool  val = true  )  [inline, protected]

Sets the indicator of whether or not this collection has changed since the last time the MBR was calculated.

Parameters:
val Optional parameter that indicates if this collection has been changed since the last time the MBR was calculated.

void SetSingleGeometryClass ( EGeometryClass  gc  )  [inline]

Set the geometry class that will be used to limit this collection.

Call this before adding any features to the collection.

Parameters:
gc All geometries added to this collection must have this geometry class.

virtual void Transform ( const BTransform cst  )  [pure virtual]

Transforms the geometry of each BFeature in this collection to a different coordinate system.

Parameters:
cst The BTransform that defines the transformation.

Implemented in BFeatures, and BFeaturesOnDisk.

virtual void TransformReverse ( const BTransform cst  )  [pure virtual]

Transforms the geometry of each BFeature in this collection to a different coordinate system using the "reverse" of the BTransform.

Parameters:
cst The BTransform that defines the transformation.

Implemented in BFeatures, and BFeaturesOnDisk.


Member Data Documentation

EGeometryClass m_geoClass [protected]

Only features that contain geometries with this class can be added to this collection.

If the value is eClassNone, all features may be added.

BGeometryCounts m_geoCounts [protected]

The count of each type geometry type in this collection.

bool m_is3d [protected]

Indicates whether or not this collection contains three-dimensional BFeature objects.

bool m_isChanged [mutable, protected]

Indicates if this collection has changed since the last time the MBR was calculated.

BRect m_mbr [mutable, protected]

The minimum bounding rectangle for the BFeature objects in the collection.


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

GeoTranslate 5.0 From Blue Marble Geographics