BPoints Class Reference

#include <BPoints.h>

Inheritance diagram for BPoints:

Inheritance graph
[legend]

List of all members.


Detailed Description

A ordered collection of BPoint objects.

Public Member Functions

void Add (const BPoints &points)
 Adds a collection of BPoints to this collection.
void Add (const BPoint &point)
 Adds a BPoint to this collection.
 BPoints (const BPoints &points)
 Copy constructor.
 BPoints (size_t size)
 Constructs a BPoint collection and reserves space for the specified number of BPoint objects.
 BPoints ()
 Default constructor.
void Clear (void)
 Removes a BPoint objects from this collection.
virtual size_t ComputeSize (void) const
 Computes the size of the BByteArray required to store this object.
virtual void DoResolveToPoint (const BPoint &refPt)
 Resolves the BPoints in this collection based on the input BPoint.
virtual void FromByteArray (const BByteArray &bytes, size_t &startPos)
 Initializes an instance of this object from a BByteArray.
BPointGetAt (size_t index)
 Gets the BPoint at the specified index in this collection.
const BPointGetAt (size_t index) const
 Gets the BPoint at the specified index in this collection.
size_t GetCount (void) const
 Get the number of BPoint objects in this collection.
BPointGetLast (void)
 Gets the last BPoint in this collection.
const BPointGetLast (void) const
 Gets the last BPoint in this collection.
bool IsClosed (void) const
 Indicates whether or not this collection of BPoints is closed.
void Remove (const BPoint &point)
 Removes the specified BPoint from this collection.
void RemoveFirst (void)
 Removes the first BPoint from this collection.
void RemoveLast (void)
 Removes the last BPoint from this collection.
void Reserve (size_t size)
 Reserves space for the requested number of elements in this collection.
BPoints ReverseCopy (void) const
 Reverses the order of the BPoints in this collection.
void SetAt (size_t index, const BPoint &point)
 Sets the BPoint at the specified index.
void SetLast (const BPoint &point)
 Sets value of the last BPoint in this collection.
virtual BByteArray ToByteArray (void) const
 Stores this object in a BByteArray.
virtual void Transform (const BTransform &cst)
 Transforms each BPoint in this collection to a different coordinate system.
virtual void TransformReverse (const BTransform &cst)
 Transforms each BPoint in this collection to a different coordinate system using the "reverse" of the BTransform.
virtual ~BPoints ()
 Destructor.

Constructor & Destructor Documentation

BPoints (  )  [inline]

Default constructor.

This will create an empty collection.

BPoints ( size_t  size  )  [inline]

Constructs a BPoint collection and reserves space for the specified number of BPoint objects.

Parameters:
size The number of BPoint objects for which space will be reserved.

BPoints ( const BPoints points  ) 

Copy constructor.

Parameters:
points The BPoints object to copy.

virtual ~BPoints (  )  [inline, virtual]

Destructor.


Member Function Documentation

void Add ( const BPoints points  )  [inline]

Adds a collection of BPoints to this collection.

Parameters:
points The collection of BPoints to be added.

void Add ( const BPoint point  )  [inline]

Adds a BPoint to this collection.

Parameters:
point The BPoint to be added.

void Clear ( void   )  [inline]

Removes a BPoint objects from this collection.

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.

Implements BByteStreamable.

virtual void DoResolveToPoint ( const BPoint refPt  )  [virtual]

Resolves the BPoints in this collection based on the input BPoint.

This should only be called for BPoints 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.

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 of the 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.

Implements BByteStreamable.

BPoint& GetAt ( size_t  index  )  [inline]

Gets the BPoint at the specified index in this collection.

Parameters:
index The zero-based index of the desired BPoint.
Returns:
The BPoint at the specified index.

const BPoint& GetAt ( size_t  index  )  const [inline]

Gets the BPoint at the specified index in this collection.

Parameters:
index The zero-based index of the desired BPoint.
Returns:
The BPoint at the specified index.

size_t GetCount ( void   )  const [inline]

Get the number of BPoint objects in this collection.

Returns:
The number of BPoint objects in this collection.

BPoint& GetLast ( void   )  [inline]

Gets the last BPoint in this collection.

Returns:
The last BPoint in this collection.

const BPoint& GetLast ( void   )  const [inline]

Gets the last BPoint in this collection.

Returns:
The last BPoint in this collection.

bool IsClosed ( void   )  const

Indicates whether or not this collection of BPoints is closed.

A collection of points is said to be closed if the first point coincides with the last point.

Returns:
True if this collection is closed and false otherwise.

void Remove ( const BPoint point  ) 

Removes the specified BPoint from this collection.

Parameters:
point The BPoint to be removed.

void RemoveFirst ( void   ) 

Removes the first BPoint from this collection.

void RemoveLast ( void   ) 

Removes the last BPoint from this collection.

void Reserve ( size_t  size  )  [inline]

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

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

BPoints ReverseCopy ( void   )  const

Reverses the order of the BPoints in this collection.

Returns:
A BPoints collection that contains the same BPoints that are in this collection, but in the opposite order.

void SetAt ( size_t  index,
const BPoint point 
) [inline]

Sets the BPoint at the specified index.

Parameters:
index The zero-based index at which to set the BPoint value.
point The BPoint whose value will be copied into the BPoint at the specified index.

void SetLast ( const BPoint point  )  [inline]

Sets value of the last BPoint in this collection.

Parameters:
point The BPoint that will replace the last BPoint in this collection.

virtual BByteArray ToByteArray ( void   )  const [virtual]

Stores this object in a BByteArray.

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

Implements BByteStreamable.

virtual void Transform ( const BTransform cst  )  [virtual]

Transforms each BPoint in this collection to a different coordinate system.

Parameters:
cst The BTransform that defines the transformation.
Returns:
True if the transformation is successful and false otherwise.

virtual void TransformReverse ( const BTransform cst  )  [virtual]

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

Parameters:
cst The BTransform that defines the transformation.
Returns:
True if the transformation is successful and false otherwise.


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

GeoTranslate 5.0 From Blue Marble Geographics