BLayers Class Reference

#include <BLayers.h>

Inheritance diagram for BLayers:

Inheritance graph
[legend]

List of all members.


Detailed Description

A collection of BLayer objects.

Public Member Functions

void Add (const BLayers &layers)
 Adds a collection of BLayer objects to this collection.
void Add (const BLayer &layer)
 Adds a copy of the specified BLayer to this collection.
void Add (const BLayerPtr &layer)
 Adds a BLayer to this collection.
 BLayers (const BLayers &layers)
 Copy constructor.
 BLayers ()
 Default constructor.
void Clear (void)
 Removes all BLayer objects from this collection.
const BLayerPtr Get (const BString &name) const
 Gets the BLayer with the specified name from this collection.
BLayerPtr Get (const BString &name)
 Gets the BLayer with the specified name from this collection.
const BLayerPtr GetAt (size_t index) const
 Gets the specified BLayer from this collection.
BLayerPtr GetAt (size_t index)
 Gets the specified BLayer from this collection.
size_t GetCount (void) const
 Get the number of BLayer objects in this collection.
const BRectGetMBR () const
 Gets the aggregate minimum bounding rectangle for all BLayer objects in this collection.
BLayersoperator= (const BLayers &rhs)
 Assignment operator.
void Remove (const BLayerPtr &layer)
 Removes a BLayer from this collection.
void RemoveEmptyLayers (void)
 Removes all empty layers from the collection.
void Reserve (size_t size)
 Reserves space for the requested number of elements in this collection.
void SetCoordSys (const BCoordSysPtr &pcs)
 Sets the coordinate system for all BLayer objects in this collection to the specified BCoordSys.
virtual bool Transform (const BTransform &ct)
 Transforms the geometry of each BLayer in this collection to a different coordinate system.
virtual bool TransformReverse (const BTransform &ct)
 Transforms the geometry of each BLayer in this collection to a different coordinate system using the "reverse" of the BTransform.
virtual ~BLayers ()
 Destructor.

Protected Member Functions

BRect ComputeMBR (void) const
 Computes the aggregate MBR for all BLayer objects in this collection.
void SetChanged (bool val=true)
 Sets the indication of whether or not the MBR needs to be recalculated.

Protected Attributes

bool m_isChanged
 A flag indicating whether or not the MBR needs to be recalculated.
BLayerPtrVector m_layers
 The collection of BLayer objects.
BRect m_mbr
 The aggregate minimum bounding rectangle for all BLayer objects in this collection.

Constructor & Destructor Documentation

BLayers (  )  [inline]

Default constructor.

This will create an empty collection.

BLayers ( const BLayers layers  ) 

Copy constructor.

Parameters:
layers The BLayers object to be copied.

virtual ~BLayers (  )  [inline, virtual]

Destructor.


Member Function Documentation

void Add ( const BLayers layers  ) 

Adds a collection of BLayer objects to this collection.

Parameters:
layers The collection of BLayer objects that will be added to this collection.

void Add ( const BLayer layer  )  [inline]

Adds a copy of the specified BLayer to this collection.

Parameters:
layer The BLayer to be added to this collection.

void Add ( const BLayerPtr layer  )  [inline]

Adds a BLayer to this collection.

Parameters:
layer A pointer to the BLayer object to be added.

void Clear ( void   )  [inline]

Removes all BLayer objects from this collection.

BRect ComputeMBR ( void   )  const [protected]

Computes the aggregate MBR for all BLayer objects in this collection.

Returns:
The aggregate MBR for all BLayer objects in this collection.

const BLayerPtr Get ( const BString name  )  const

Gets the BLayer with the specified name from this collection.

Parameters:
name The name of the desired BLayer.
Returns:
The BLayer with the specified name or NULL if no such BLayer exists in this collection.

BLayerPtr Get ( const BString name  ) 

Gets the BLayer with the specified name from this collection.

Parameters:
name The name of the desired BLayer.
Returns:
The BLayer with the specified name or NULL if no such BLayer exists in this collection.

const BLayerPtr GetAt ( size_t  index  )  const [inline]

Gets the specified BLayer from this collection.

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

BLayerPtr GetAt ( size_t  index  )  [inline]

Gets the specified BLayer from this collection.

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

size_t GetCount ( void   )  const [inline]

Get the number of BLayer objects in this collection.

Returns:
The number of BLayer objects in this collection.

const BRect& GetMBR (  )  const

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

Returns:
The aggregate MBR for the BLayers in this collection.

BLayers& operator= ( const BLayers rhs  ) 

Assignment operator.

Parameters:
rhs The BLayers object whose value will be copied into this one.
Returns:
A reference to this BLayers object.

void Remove ( const BLayerPtr layer  ) 

Removes a BLayer from this collection.

Parameters:
layer The BLayer to be removed.

void RemoveEmptyLayers ( void   ) 

Removes all empty layers from the collection.

An empty BLayer is one that does not contain any BFeatures.

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.

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

Sets the indication of whether or not the MBR needs to be recalculated.

Parameters:
val True if the MBR needs to be recalculated and false otherwise.

void SetCoordSys ( const BCoordSysPtr pcs  ) 

Sets the coordinate system for all BLayer objects in this collection to the specified BCoordSys.

Please note that this method is intended to be used to set a coordinate system for BLayers whose source data does not include a coordinate system definition (e.g. DWG or DGN files). If a BLayer already has a different BCoordSys, the existing BCoordSys will be left in place.

Parameters:
pcs The new coordinate system definition.

virtual bool Transform ( const BTransform ct  )  [virtual]

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

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

virtual bool TransformReverse ( const BTransform ct  )  [virtual]

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

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


Member Data Documentation

bool m_isChanged [mutable, protected]

A flag indicating whether or not the MBR needs to be recalculated.

BLayerPtrVector m_layers [protected]

The collection of BLayer objects.

BRect m_mbr [mutable, protected]

The aggregate minimum bounding rectangle for all BLayer objects in this collection.


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

GeoTranslate 5.0 From Blue Marble Geographics