BAggregateLinear Class Reference

#include <BAggregateLinear.h>

Inheritance diagram for BAggregateLinear:

Inheritance graph
[legend]

List of all members.


Detailed Description

An aggregate geometry that contains only BLinearGeo geometries.

Public Member Functions

void Add (const BAggregateLinear &aggy)
 Adds a collection of BLinearGeo geometries to this BAggregateLinear geometry.
void Add (const BLinearGeoPtr &pGeo)
 Adds a BLinearGeo to this BAggregateLinear geometry.
virtual void AddGeometry (const BGeometryPtr &pGeo)
 Adds a BGeometry to this BAggregateLinear.
 BAggregateLinear (const BAggregateLinear &aggy)
 Copy constructor.
 BAggregateLinear ()
 Default constructor, which constructs an empty collection of BLinearGeo objects.
virtual BGeometryClone (void) const
 Creates a deep-copy of this object.
virtual size_t ComputeSize (void) const
 Computes the size of the BByteArray required to store this object.
virtual bool Contains3dGeometry () const
 Indicates whether or not this BAggregateLinear contains 3D geometries.
virtual double DistanceTo (const BPoint &point) const
 Calculates the minimum distance from this BGeometry to the specified BPoint.
virtual void DoResolveToPoint (const BPoint &refPt)
 Resolves this BGeometry based on the input BPoint.
BAggregateLinearPtr Flatten (void) const
 Flattens the collection.
virtual void FromByteArray (const BByteArray &bytes, size_t &startPos)
 Initializes an instance of this object from a BByteArray.
virtual BGeometryPtr GetGeometryAt (size_t index) const
 Gets a BLinearGeo from this BAggregateLinear geometry.
virtual size_t GetGeometryCount (void) const
 Get the number of BLinearGeo objects in this BAggregateLinear.
virtual size_t GetPointCount (void) const
 Gets the total number of points in this BAggregateLinear.
virtual bool Intersects (const BRect &rect) const
 Determines whether or not this BGeometry intersects the specified BRect.
virtual bool IsAggregate (void) const
 Determines whether or not this BGeometry is an aggregate geometry.
void Remove (const BLinearGeoPtr &pGeo)
 Removes a BLinearGeo from this BAggregateLinear geometry.
virtual BByteArray ToByteArray (void) const
 Stores this object in a BByteArray.
virtual void Transform (const BTransform &cst)
 Transforms the coordinates in this BGeometry to a different coordinate system.
virtual void TransformReverse (const BTransform &cst)
 Transforms the coordinates in this BGeometry to a different coordinate system using the "reverse" of the BTransform.
virtual ~BAggregateLinear ()
 Destructor.

Protected Member Functions

virtual BRect ComputeMBR () const
 Computes the minimum bounding rectangle for this BAggregateLinear.
virtual void ComputeStats (void) const
 Calculates the length and MBR of this BAggregateLinear geometry.

Constructor & Destructor Documentation

BAggregateLinear (  )  [inline]

Default constructor, which constructs an empty collection of BLinearGeo objects.

BAggregateLinear ( const BAggregateLinear aggy  ) 

Copy constructor.

Parameters:
aggy The BAggregateLinear to copy.

virtual ~BAggregateLinear (  )  [inline, virtual]

Destructor.


Member Function Documentation

void Add ( const BAggregateLinear aggy  ) 

Adds a collection of BLinearGeo geometries to this BAggregateLinear geometry.

Parameters:
aggy The collection of BLinearGeo geometries.

void Add ( const BLinearGeoPtr pGeo  ) 

Adds a BLinearGeo to this BAggregateLinear geometry.

Parameters:
pGeo The BLinearGeo to add to this BAggregateLinear.

virtual void AddGeometry ( const BGeometryPtr pGeo  )  [virtual]

Adds a BGeometry to this BAggregateLinear.

This method will only succeed if the specified BGeometry inherits from BLinearGeo.

Parameters:
pGeo The BGeometry to be added.

Implements BGeometryCollection.

virtual BGeometry* Clone ( void   )  const [virtual]

Creates a deep-copy of this object.

Returns:
A deep-copy of this object.

Implements BGeometry.

virtual BRect ComputeMBR (  )  const [protected, virtual]

Computes the minimum bounding rectangle for this BAggregateLinear.

Returns:
The minimum bounding rectangle.

Implements BGeometry.

virtual size_t ComputeSize ( void   )  const [inline, virtual]

Computes the size of the BByteArray required to store this object.

Returns:
The size of the BByteArray.

Reimplemented from BLinearGeo.

virtual void ComputeStats ( void   )  const [protected, virtual]

Calculates the length and MBR of this BAggregateLinear geometry.

Implements BLinearGeo.

virtual bool Contains3dGeometry (  )  const [virtual]

Indicates whether or not this BAggregateLinear contains 3D geometries.

Returns:
True if this collection contains 3D geometry and false otherwise.

Implements BGeometryCollection.

virtual double DistanceTo ( const BPoint point  )  const [virtual]

Calculates the minimum distance from this BGeometry to the specified BPoint.

Parameters:
point The BPoint used to calculate distance.
Returns:
The distance. The units used to express this distance are the same as the units used to express the location of this BGeometry.

Reimplemented from BGeometry.

virtual void DoResolveToPoint ( const BPoint refPt  )  [virtual]

Resolves this BGeometry based on the input BPoint.

This should only be called on BGeometry objects that are part of a BBlockDef and contain coordinates that represent offsets from a point rather then an absolute location.

Parameters:
refPt The insertion point.

Implements BGeometry.

BAggregateLinearPtr Flatten ( void   )  const

Flattens the collection.

Returns a BAggregateLinear that contains only primitive geometries. Any aggregates (e.g. BAggregateLinear) will be flattened and their primative geometries added to this collection.

Returns:
The BAggregateLinear containing primitive geometries.

virtual void FromByteArray ( const BByteArray bytes,
size_t &  startPos 
) [virtual]

Initializes an instance of this object from a BByteArray.

Parameters:
bytes The BByteArray containing the byte representation for this object.
startPos The position in the BByteArray where the byte representation begins. This value will be updated to point to the byte past the end of this object in the byte array.

Reimplemented from BLinearGeo.

virtual BGeometryPtr GetGeometryAt ( size_t  index  )  const [virtual]

Gets a BLinearGeo from this BAggregateLinear geometry.

Parameters:
index The index of the desired BLinearGeo.
Returns:
The BLinearGeo at the specified index.

Implements BGeometryCollection.

virtual size_t GetGeometryCount ( void   )  const [inline, virtual]

Get the number of BLinearGeo objects in this BAggregateLinear.

Returns:
The number of BLinearGeo objects in this BAggregateLinear.

Implements BGeometryCollection.

virtual size_t GetPointCount ( void   )  const [virtual]

Gets the total number of points in this BAggregateLinear.

Returns:
The number of points.

virtual bool Intersects ( const BRect rect  )  const [virtual]

Determines whether or not this BGeometry intersects the specified BRect.

Parameters:
rect The BRect to test for intersection.
Returns:
True if this BGeometry intersects the BRect and false otherwise.

Reimplemented from BGeometry.

virtual bool IsAggregate ( void   )  const [inline, virtual]

Determines whether or not this BGeometry is an aggregate geometry.

Since this is a BAggregateLinear, this method will always return true.

Returns:
True if this BGeometry is an aggregate (a collection of geometries) and false otherwise

Reimplemented from BGeometry.

void Remove ( const BLinearGeoPtr pGeo  ) 

Removes a BLinearGeo from this BAggregateLinear geometry.

Parameters:
pGeo The BLinearGeo to remove from this BAggregateLinear.

virtual BByteArray ToByteArray ( void   )  const [virtual]

Stores this object in a BByteArray.

Returns:
A BByteArray that stores the contents of this object.

Reimplemented from BLinearGeo.

virtual void Transform ( const BTransform cst  )  [virtual]

Transforms the coordinates in this BGeometry to a different coordinate system.

Parameters:
cst The BTransform that describes the transformation.

Reimplemented from BGeometry.

virtual void TransformReverse ( const BTransform cst  )  [virtual]

Transforms the coordinates in this BGeometry to a different coordinate system using the "reverse" of the BTransform.

Parameters:
cst The BTransform that describes the transformation.

Reimplemented from BGeometry.


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

GeoTranslate 5.0 From Blue Marble Geographics