Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

C2DBaseSet Class Reference

A set of geometric entities of different types held as pointers to a base class geometric entity. More...

#include <2DBaseSet.h>

Inheritance diagram for C2DBaseSet:

C2DBase C2DHoledPolyArcSet C2DHoledPolyBaseSet C2DHoledPolygonSet C2DLineBaseSet C2DLineBaseSetSet C2DLineSet C2DPointSet C2DPolyArcSet C2DPolyBaseSet C2DPolygonSet C2DRectSet List of all members.

Public Member Functions

 C2DBaseSet ()
 Constructor.
 ~C2DBaseSet ()
 Constructor.
void DeleteAll (void)
 Deletes all the pointers and removes them.
void Add (C2DBase *NewItem)
 Adds a new pointer and takes responsibility for it.
void DeleteAndSet (int nIndx, C2DBase *NewItem)
 Deletes the current item and sets the pointer to be the new one.
C2DBaseExtractAndSet (int nIndx, C2DBase *NewItem)
 Extracts the current item and sets the pointer to be the new one.
unsigned int size (void) const
 returns the size
C2DBaseGetAt (int nIndx)
 Returns the value at the point given.
const C2DBaseGetAt (int nIndx) const
 Returns the value at the point given.
C2DBaseoperator[] (int nIndx)
 Returns a reference to the value at the point given.
const C2DBaseoperator[] (int nIndx) const
 Returns a reference to the value at the point given.
C2DBaseGetLast (void)
 Returns a pointer to the last item.
void DeleteAt (unsigned int nIndx)
 Deletion.
void DeleteLast (void)
 Deletion of the last.
C2DBaseExtractAt (unsigned int nIndx)
 Extracts the pointer passing deletion responsibility over.
C2DBaseExtractLast (void)
 Extracts the pointer passing deletion responsibility over.
void InsertAt (unsigned int nIndx, C2DBase *NewItem)
 Insertion.
void InsertAt (unsigned int nIndx, C2DBaseSet &Other)
 Insertion of another array.
void ReverseOrder (void)
 Reverses the order.
void operator<< (C2DBaseSet &Other)
 Passes all the pointers from the Other into this.
void operator<< (C2DBase *NewItem)
 Adds a new pointer and takes responsibility for it.
void Move (const C2DVector &Vector)
 Moves the collection by the vector provided.
void RotateToRight (double dAng, const C2DPoint &Origin)
 Rotates the collection by the angles, around the origin.
void Grow (double dFactor, const C2DPoint &Origin)
 Grows the collection by the factor, around the origin.
void Reflect (const C2DPoint &Point)
 Reflects the collection in the point given.
void Reflect (const C2DLine &Line)
 Reflects throught the line provided.
double Distance (const C2DPoint &Point) const
 Calculcates the minimum distance, of the whole collection from the point.
void SortByDistance (const C2DPoint &pt, bool bAscending=true)
 Sorts the collection by the distance from the point.
void GetBoundingRect (C2DRect &Rect) const
 Returns the bounding rectangle for the whole collection.
void SnapToGrid (void)
 Snaps all in the collection to the grid. see CGrid.
void Project (const C2DLine &Line, CInterval &Interval) const
 Projects the whole set onto the line given.
void Project (const C2DVector &Vector, CInterval &Interval) const
 Projects the whole set onto the vector given.

Protected Attributes

void * m_Data
 This is a pointer to the data which is defined is the constructor.

Detailed Description

A set of geometric entities of different types held as pointers to a base class geometric entity.

---------------------------------------------------------------------------


Constructor & Destructor Documentation

C2DBaseSet::C2DBaseSet  ) 
 

Constructor.

--------------------------------------------------------------------------
C2DBaseSet::C2DBaseSet

---------------------------------------------------------------------------

C2DBaseSet::~C2DBaseSet  ) 
 

Constructor.

--------------------------------------------------------------------------
C2DBaseSet::~C2DBaseSet

---------------------------------------------------------------------------


Member Function Documentation

void C2DBaseSet::Add C2DBase NewItem  ) 
 

Adds a new pointer and takes responsibility for it.

--------------------------------------------------------------------------
C2DBaseSet::Add

---------------------------------------------------------------------------

void C2DBaseSet::DeleteAll void   ) 
 

Deletes all the pointers and removes them.

--------------------------------------------------------------------------
C2DBaseSet::DeleteAll

---------------------------------------------------------------------------

void C2DBaseSet::DeleteAndSet int  nIndx,
C2DBase NewItem
 

Deletes the current item and sets the pointer to be the new one.

--------------------------------------------------------------------------
C2DBaseSet::DeleteAndSet

---------------------------------------------------------------------------

void C2DBaseSet::DeleteAt unsigned int  nIndx  ) 
 

Deletion.

--------------------------------------------------------------------------
C2DBaseSet::DeleteAt

---------------------------------------------------------------------------

void C2DBaseSet::DeleteLast void   ) 
 

Deletion of the last.

--------------------------------------------------------------------------
C2DBaseSet::DeleteLast

---------------------------------------------------------------------------

double C2DBaseSet::Distance const C2DPoint Point  )  const [virtual]
 

Calculcates the minimum distance, of the whole collection from the point.

--------------------------------------------------------------------------
C2DBaseSet::Distance

---------------------------------------------------------------------------

Implements C2DBase.

C2DBase * C2DBaseSet::ExtractAndSet int  nIndx,
C2DBase NewItem
 

Extracts the current item and sets the pointer to be the new one.

--------------------------------------------------------------------------
C2DBaseSet::ExtractAndSet

---------------------------------------------------------------------------

C2DBase * C2DBaseSet::ExtractAt unsigned int  nIndx  ) 
 

Extracts the pointer passing deletion responsibility over.

--------------------------------------------------------------------------
C2DBaseSet::ExtractAt

---------------------------------------------------------------------------

Reimplemented in C2DHoledPolyArcSet, C2DHoledPolyBaseSet, C2DHoledPolygonSet, C2DLineBaseSet, C2DLineBaseSetSet, C2DLineSet, C2DPointSet, C2DPolyArcSet, C2DPolyBaseSet, C2DPolygonSet, and C2DRectSet.

C2DBase * C2DBaseSet::ExtractLast void   ) 
 

Extracts the pointer passing deletion responsibility over.

--------------------------------------------------------------------------
C2DBaseSet::ExtractLast

---------------------------------------------------------------------------

Reimplemented in C2DHoledPolyArcSet, C2DHoledPolyBaseSet, C2DHoledPolygonSet, C2DLineBaseSet, C2DLineBaseSetSet, C2DLineSet, C2DPointSet, C2DPolyArcSet, C2DPolyBaseSet, C2DPolygonSet, and C2DRectSet.

const C2DBase * C2DBaseSet::GetAt int  nIndx  )  const
 

Returns the value at the point given.

--------------------------------------------------------------------------
C2DBaseSet::GetAt

---------------------------------------------------------------------------

Reimplemented in C2DHoledPolyArcSet, C2DHoledPolyBaseSet, C2DHoledPolygonSet, C2DLineBaseSet, C2DLineBaseSetSet, C2DLineSet, C2DPointSet, C2DPolyArcSet, C2DPolyBaseSet, C2DPolygonSet, and C2DRectSet.

C2DBase * C2DBaseSet::GetAt int  nIndx  ) 
 

Returns the value at the point given.

--------------------------------------------------------------------------
C2DBaseSet::GetAt

---------------------------------------------------------------------------

Reimplemented in C2DHoledPolyArcSet, C2DHoledPolyBaseSet, C2DHoledPolygonSet, C2DLineBaseSet, C2DLineBaseSetSet, C2DLineSet, C2DPointSet, C2DPolyArcSet, C2DPolyBaseSet, C2DPolygonSet, and C2DRectSet.

void C2DBaseSet::GetBoundingRect C2DRect Rect  )  const [virtual]
 

Returns the bounding rectangle for the whole collection.

--------------------------------------------------------------------------
C2DBaseSet::GetBoundingRect

---------------------------------------------------------------------------

Implements C2DBase.

Reimplemented in C2DPointSet.

C2DBase * C2DBaseSet::GetLast void   ) 
 

Returns a pointer to the last item.

--------------------------------------------------------------------------
C2DBaseSet::GetLast

---------------------------------------------------------------------------

Reimplemented in C2DHoledPolyArcSet, C2DHoledPolyBaseSet, C2DHoledPolygonSet, C2DLineBaseSet, C2DLineBaseSetSet, C2DLineSet, C2DPointSet, C2DPolyArcSet, C2DPolyBaseSet, C2DPolygonSet, and C2DRectSet.

void C2DBaseSet::Grow double  dFactor,
const C2DPoint Origin
[virtual]
 

Grows the collection by the factor, around the origin.

--------------------------------------------------------------------------
C2DBaseSet::Grow

---------------------------------------------------------------------------

Implements C2DBase.

void C2DBaseSet::InsertAt unsigned int  nIndx,
C2DBaseSet Other
 

Insertion of another array.

--------------------------------------------------------------------------
C2DBaseSet::InsertAt

---------------------------------------------------------------------------

void C2DBaseSet::InsertAt unsigned int  nIndx,
C2DBase NewItem
 

Insertion.

--------------------------------------------------------------------------
C2DBaseSet::InsertAt

---------------------------------------------------------------------------

void C2DBaseSet::Move const C2DVector Vector  )  [virtual]
 

Moves the collection by the vector provided.

--------------------------------------------------------------------------
C2DBaseSet::Move

---------------------------------------------------------------------------

Implements C2DBase.

void C2DBaseSet::operator<< C2DBase pNewItem  ) 
 

Adds a new pointer and takes responsibility for it.

--------------------------------------------------------------------------
C2DBaseSet::operator<<

---------------------------------------------------------------------------

void C2DBaseSet::operator<< C2DBaseSet Other  ) 
 

Passes all the pointers from the Other into this.

--------------------------------------------------------------------------
C2DBaseSet::operator<<

---------------------------------------------------------------------------

Reimplemented in C2DHoledPolyArcSet, C2DHoledPolyBaseSet, C2DHoledPolygonSet, C2DLineBaseSet, C2DLineSet, C2DPointSet, C2DPolyArcSet, C2DPolyBaseSet, C2DPolygonSet, and C2DRectSet.

const C2DBase & C2DBaseSet::operator[] int  nIndx  )  const
 

Returns a reference to the value at the point given.

--------------------------------------------------------------------------
C2DBaseSet::operator[]

---------------------------------------------------------------------------

Reimplemented in C2DHoledPolyArcSet, C2DHoledPolyBaseSet, C2DHoledPolygonSet, C2DLineBaseSet, C2DLineBaseSetSet, C2DLineSet, C2DPointSet, C2DPolyArcSet, C2DPolyBaseSet, C2DPolygonSet, and C2DRectSet.

C2DBase & C2DBaseSet::operator[] int  nIndx  ) 
 

Returns a reference to the value at the point given.

--------------------------------------------------------------------------
C2DBaseSet::operator[]

---------------------------------------------------------------------------

Reimplemented in C2DHoledPolyArcSet, C2DHoledPolyBaseSet, C2DHoledPolygonSet, C2DLineBaseSet, C2DLineBaseSetSet, C2DLineSet, C2DPointSet, C2DPolyArcSet, C2DPolyBaseSet, C2DPolygonSet, and C2DRectSet.

void C2DBaseSet::Project const C2DVector Vector,
CInterval Interval
const [virtual]
 

Projects the whole set onto the vector given.

--------------------------------------------------------------------------
C2DBaseSet::Project

---------------------------------------------------------------------------

Implements C2DBase.

void C2DBaseSet::Project const C2DLine Line,
CInterval Interval
const [virtual]
 

Projects the whole set onto the line given.

--------------------------------------------------------------------------
C2DBaseSet::Project

---------------------------------------------------------------------------

Implements C2DBase.

void C2DBaseSet::Reflect const C2DLine Line  )  [virtual]
 

Reflects throught the line provided.

--------------------------------------------------------------------------
C2DBaseSet::Reflect

---------------------------------------------------------------------------

Implements C2DBase.

void C2DBaseSet::Reflect const C2DPoint Point  )  [virtual]
 

Reflects the collection in the point given.

--------------------------------------------------------------------------
C2DBaseSet::Reflect

---------------------------------------------------------------------------

Implements C2DBase.

void C2DBaseSet::ReverseOrder void   ) 
 

Reverses the order.

--------------------------------------------------------------------------
C2DBaseSet::ReverseOrder

---------------------------------------------------------------------------

void C2DBaseSet::RotateToRight double  dAng,
const C2DPoint Origin
[virtual]
 

Rotates the collection by the angles, around the origin.

--------------------------------------------------------------------------
C2DBaseSet::RotateToRight

---------------------------------------------------------------------------

Implements C2DBase.

unsigned int C2DBaseSet::size void   )  const
 

returns the size

--------------------------------------------------------------------------
C2DBaseSet::size

---------------------------------------------------------------------------

void C2DBaseSet::SnapToGrid void   )  [virtual]
 

Snaps all in the collection to the grid. see CGrid.

--------------------------------------------------------------------------
C2DBaseSet::SnapToGrid

---------------------------------------------------------------------------

Implements C2DBase.

void C2DBaseSet::SortByDistance const C2DPoint pt,
bool  bAscending = true
 

Sorts the collection by the distance from the point.

--------------------------------------------------------------------------
C2DBaseSet::SortByDistance

---------------------------------------------------------------------------


The documentation for this class was generated from the following files:
Generated on Mon Apr 21 11:43:51 2008 for GeoLib by  doxygen 1.4.4