BLayer Class Reference

#include <BLayer.h>

Inheritance diagram for BLayer:

Inheritance graph
[legend]

List of all members.


Detailed Description

Abstract base class for a data layer.

Public Member Functions

void AddChild (const BLayerPtr &pLayer)
 Adds a child layer to this BLayer.
 BLayer (const BLayer &l)
 Copy constructor.
void ClearChildren (void)
 Removes all child layers from this BLayer.
virtual BLayerClone (void) const =0
 Create a deep-copy of this object.
BLayerPtr GetChildAt (size_t index)
 Gets the child layer at the specified index.
size_t GetChildCount (void) const
 Gets the number of children that this BLayer has.
const BCoordSysPtrGetCoordSys (void) const
 Gets the coordinate system for this BLayer.
virtual const BRectGetMBR (void) const
 Gets the minimum bounding rectangle for this BLayer.
const BStringGetName (void) const
 Gets the name of this BLayer.
BLayerPtr GetParent (void) const
 Gets the parent of the current BLayer.
ELayerType GetType (void) const
 Get the layer type.
bool HasChildren (void) const
 Indicates whether or not this BLayer has child layers.
bool HasCoordSys (void) const
 Indicates whether or not this BLayer has a valid coordinate system.
bool IsChild (const BLayerPtr pLayer) const
 Indicates whether or not the specified BLayer is a child of this BLayer, or a child of a child layer.
virtual bool IsEmpty (void) const =0
 Gets an indication of whether or not this BLayer is empty.
bool IsParent (const BLayerPtr pLayer) const
 Indicates whether or not the specified BLayer is the parent of this BLayer, or the parent of the parent of this BLayer, or the parent of the parent of the parent of this BLayer, etc.
bool IsVisible (void) const
 Gets an indication of whether or not this BLayer is currently visible.
void RemoveChild (const BLayerPtr &pLayer)
 Removes the specified child from this BLayer.
virtual void SetCoordSys (const BCoordSysPtr &cs)
 Sets the coordinate system for this BLayer.
void SetMBR (const BRect &mbr)
 Sets the minimum bounding rectangle for this BLayer.
void SetName (const BString &name)
 Sets the name of this BLayer.
void SetParent (const BLayerPtr &pLayer)
 Sets the specified BLayer to be the parent of the current BLayer.
void SetVisible (bool visible)
 Sets the visibility of this BLayer.
virtual bool Transform (const BTransform &ct)=0
 Transforms the geometry in this BLayer to a different coordinate system.
virtual bool TransformReverse (const BTransform &ct)=0
 Transforms the geometry in this BLayer to a different coordinate system using the "reverse" of the BTransform.
virtual ~BLayer ()
 Destructor.

Static Public Member Functions

static void SetRelationship (BLayerPtr pParent, BLayerPtr pChild)
 Sets up a parent/child relationship for the specified BLayers.

Protected Member Functions

 BLayer (ELayerType type)
 Constructs a BLayer of the specified type.
 BLayer ()
 Default constructor.

Protected Attributes

BLayerPtrVector m_childLayers
 The collection of children of this BLayer.
bool m_isVisible
 Indicates whether this BLayer is currently visible.
BRect m_mbr
 The minimum bounding rectangle for this BLayer.
BString m_name
 The name of this BLayer.
BCoordSysPtr m_pCoordSys
 The coordinate system currently in use by this BLayer.
BLayerPtr m_pParentLayer
 The parent of this BLayer.
ELayerType m_type
 Indicates the type of this BLayer.

Constructor & Destructor Documentation

BLayer ( const BLayer l  )  [inline]

Copy constructor.

Parameters:
l the BLayer object to be copied.

virtual ~BLayer (  )  [inline, virtual]

Destructor.

BLayer (  )  [inline, protected]

Default constructor.

This constructor is hidden because this is an abstract class.

BLayer ( ELayerType  type  )  [inline, protected]

Constructs a BLayer of the specified type.

This constructor is hidden because this is an abstract class.

Parameters:
type The type of the BLayer.


Member Function Documentation

void AddChild ( const BLayerPtr pLayer  ) 

Adds a child layer to this BLayer.

Parameters:
pLayer The BLayer to be added as a child.
Exceptions:
BLayerTreeException This exception will be thrown if the specified BLayer is a parent for this BLayer, or if the specified BLayer is already a child of this BLayer.

void ClearChildren ( void   )  [inline]

Removes all child layers from this BLayer.

virtual BLayer* Clone ( void   )  const [pure virtual]

Create a deep-copy of this object.

Returns:
A deep-copy of this object.

Implemented in BVectorLayer.

BLayerPtr GetChildAt ( size_t  index  )  [inline]

Gets the child layer at the specified index.

Parameters:
index The zero-based index of the requested child layer.
Returns:
The child layer.

size_t GetChildCount ( void   )  const [inline]

Gets the number of children that this BLayer has.

Returns:
The number of child layers.

const BCoordSysPtr& GetCoordSys ( void   )  const [inline]

Gets the coordinate system for this BLayer.

Returns:
The coordinate system for this BLayer.

virtual const BRect& GetMBR ( void   )  const [inline, virtual]

Gets the minimum bounding rectangle for this BLayer.

Returns:
The minimum bounding rectangle for this BLayer.

Reimplemented in BVectorLayer.

const BString& GetName ( void   )  const [inline]

Gets the name of this BLayer.

Returns:
The name of this BLayer.

BLayerPtr GetParent ( void   )  const [inline]

Gets the parent of the current BLayer.

Returns:
The parent BLayer. The return value will be NULL if this BLayer does not have a parent.

ELayerType GetType ( void   )  const [inline]

Get the layer type.

Returns:
The layer type.

bool HasChildren ( void   )  const [inline]

Indicates whether or not this BLayer has child layers.

Returns:
True if this BLayer has children and false otherwise.

bool HasCoordSys ( void   )  const [inline]

Indicates whether or not this BLayer has a valid coordinate system.

Returns:
True if this BLayer has a valid coordinate system and false otherwise.

bool IsChild ( const BLayerPtr  pLayer  )  const

Indicates whether or not the specified BLayer is a child of this BLayer, or a child of a child layer.

Parameters:
pLayer The BLayer to test.
Returns:
True if the specified BLayer is a child of this BLayer or the child of a child layer.

virtual bool IsEmpty ( void   )  const [pure virtual]

Gets an indication of whether or not this BLayer is empty.

Derived classes must implement this function.

Returns:
True if this BLayer is empty and false otherwise.

Implemented in BVectorLayer.

bool IsParent ( const BLayerPtr  pLayer  )  const

Indicates whether or not the specified BLayer is the parent of this BLayer, or the parent of the parent of this BLayer, or the parent of the parent of the parent of this BLayer, etc.

Parameters:
pLayer The BLayer to test.
Returns:
True if the specified BLayer is the parent of this BLayer or the parent of a BLayer further up in the tree.

bool IsVisible ( void   )  const [inline]

Gets an indication of whether or not this BLayer is currently visible.

Returns:
True if this BLayer is visible and false otherwise.

void RemoveChild ( const BLayerPtr pLayer  ) 

Removes the specified child from this BLayer.

Parameters:
pLayer The child layer to be removed.

virtual void SetCoordSys ( const BCoordSysPtr cs  )  [inline, virtual]

Sets the coordinate system for this BLayer.

Parameters:
cs The coordinate system for this BLayer.

void SetMBR ( const BRect mbr  )  [inline]

Sets the minimum bounding rectangle for this BLayer.

Parameters:
mbr The minimum bounding rectangle.

void SetName ( const BString name  )  [inline]

Sets the name of this BLayer.

Parameters:
name The name for this BLayer.

void SetParent ( const BLayerPtr pLayer  ) 

Sets the specified BLayer to be the parent of the current BLayer.

Parameters:
pLayer The BLayer that shall act as the parent to this BLayer.
Exceptions:
BLayerTreeException This exception will be thrown if this BLayer already has a parent.

static void SetRelationship ( BLayerPtr  pParent,
BLayerPtr  pChild 
) [static]

Sets up a parent/child relationship for the specified BLayers.

Parameters:
pParent The BLayer that will be the parent layer.
pChild The BLayer that will be the child layer.

void SetVisible ( bool  visible  )  [inline]

Sets the visibility of this BLayer.

Parameters:
visible True for visible and false for invisible.

virtual bool Transform ( const BTransform ct  )  [pure virtual]

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

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

Implemented in BVectorLayer.

virtual bool TransformReverse ( const BTransform ct  )  [pure virtual]

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

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

Implemented in BVectorLayer.


Member Data Documentation

BLayerPtrVector m_childLayers [protected]

The collection of children of this BLayer.

bool m_isVisible [protected]

Indicates whether this BLayer is currently visible.

BRect m_mbr [mutable, protected]

The minimum bounding rectangle for this BLayer.

BString m_name [protected]

The name of this BLayer.

BCoordSysPtr m_pCoordSys [protected]

The coordinate system currently in use by this BLayer.

BLayerPtr m_pParentLayer [protected]

The parent of this BLayer.

ELayerType m_type [protected]

Indicates the type of this BLayer.


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

GeoTranslate 5.0 From Blue Marble Geographics