Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::AbstractGenPointChain< T > Class Template Reference
[Points]

#include <qgarlib/AbstractGenPointChain.H>

Inheritance diagram for qgar::AbstractGenPointChain< T >:

qgar::GenPointChain< T > List of all members.

Detailed Description

template<class T>
class qgar::AbstractGenPointChain< T >

Base class for chain of points having coordinates of type T.

A point is an instance of class qgar::GenPoint<T>. New points can only be inserted to the beginning or to the end of the chain.

Such a chain is provided with some kind of internal ``iterator'', that allows bidirectional traversal of the chain. The validity of this iterator is preserved by any of the public operations of the class.

Predefined types:

Warning:
This is an abstract class: It cannot be instantiated. Pure virtual functions are:
Author:
Gérald Masini, from previous work by Karl Tombre
Date:
December 10, 2003 19:19
Since:
Qgar 2.1.1

Definition at line 134 of file AbstractGenPointChain.H.

Public Types

Types
typedef T value_type
 Type of the points stored in the chain.
typedef value_typereference
 Reference to qgar::AbstractGenPointChain::value_type.
typedef const value_typeconst_reference
 Constant reference to qgar::AbstractGenPointChain::value_type.
typedef value_typepointer
 Pointer to qgar::AbstractGenPointChain::value_type.
typedef const value_typeconst_pointer
 Constant pointer to qgar::AbstractGenPointChain::value_type.

Public Member Functions

Constructors
 AbstractGenPointChain ()
 Default constructor.
Destructor
virtual ~AbstractGenPointChain ()
 Virtual destructor.
Access to chain characteristics
virtual bool empty () const =0
 Is current chain empty?
virtual int size () const =0
 Get chain size (number of points).
Iterator
virtual void setToBegin ()=0
 Set internal iterator to the beginning of the chain.
virtual void setToEnd ()=0
 Set internal iterator to the end of the chain.
virtual bool isAtBegin () const =0
 Does internal iterator points to the beginning of the chain?
virtual bool isAtEnd () const =0
 Does internal iterator points to the end of the chain?
virtual bool hasNext () const =0
 Is there a point after the current point?
virtual bool hasPrevious () const =0
 Is there a point before the current point?
virtual void moveNext ()=0
 Move to next point, that becomes the current point.
virtual void movePrevious ()=0
 Move to previous point, that becomes the current point.
Access to points
virtual const GenPoint< value_type > & accessFront () const =0
 Get the first point.
virtual GenPoint< value_typefront () const =0
 Get a copy of the first point.
virtual const GenPoint< value_type > & accessBack () const =0
 Get the last point.
virtual GenPoint< value_typeback () const =0
 Get a copy of the last point.
virtual const GenPoint< value_type > & accessCurrent () const =0
 Get the current point.
virtual GenPoint< value_typecurrent () const =0
 Get a copy of the current point.
virtual const GenPoint< value_type > & accessNext ()=0
 Get the successor of the current point.
virtual GenPoint< value_typenext ()=0
 Get a copy of the successor of the current point.
virtual const GenPoint< value_type > & accessPrevious ()=0
 Get the predecessor of the current point.
virtual GenPoint< value_typeprevious ()=0
 Get a copy of the predecessor of the current point.
Insertion
virtual void push_front (const GenPoint< value_type > &aPt)=0
 Insert a point at the beginning of the chain.
virtual void push_back (const GenPoint< value_type > &aPt)=0
 Insert a point at the end of the chain.
Transformations
virtual void reverse ()=0
 Reverse the order of elements in the list.
Conversions
Insert the elements of a given chain at the end of current chain.

virtual std::list< GenPoint<
value_type > > 
toPointList () const =0
 Get a (STL) list of the points of the chain.


Member Typedef Documentation

template<class T>
typedef const value_type* qgar::AbstractGenPointChain< T >::const_pointer
 

Constant pointer to qgar::AbstractGenPointChain::value_type.

Reimplemented in qgar::GenPointChain< T >.

Definition at line 169 of file AbstractGenPointChain.H.

template<class T>
typedef const value_type& qgar::AbstractGenPointChain< T >::const_reference
 

Constant reference to qgar::AbstractGenPointChain::value_type.

Reimplemented in qgar::GenPointChain< T >.

Definition at line 159 of file AbstractGenPointChain.H.

template<class T>
typedef value_type* qgar::AbstractGenPointChain< T >::pointer
 

Pointer to qgar::AbstractGenPointChain::value_type.

Reimplemented in qgar::GenPointChain< T >.

Definition at line 164 of file AbstractGenPointChain.H.

template<class T>
typedef value_type& qgar::AbstractGenPointChain< T >::reference
 

Reference to qgar::AbstractGenPointChain::value_type.

Reimplemented in qgar::GenPointChain< T >.

Definition at line 154 of file AbstractGenPointChain.H.

template<class T>
typedef T qgar::AbstractGenPointChain< T >::value_type
 

Type of the points stored in the chain.

Reimplemented in qgar::GenPointChain< T >.

Definition at line 149 of file AbstractGenPointChain.H.


Constructor & Destructor Documentation

template<class T>
qgar::AbstractGenPointChain< T >::AbstractGenPointChain  ) 
 

Default constructor.

Definition at line 51 of file AbstractGenPointChain.TCC.

template<class T>
qgar::AbstractGenPointChain< T >::~AbstractGenPointChain  )  [virtual]
 

Virtual destructor.

Definition at line 65 of file AbstractGenPointChain.TCC.


Member Function Documentation

template<class T>
virtual const GenPoint<value_type>& qgar::AbstractGenPointChain< T >::accessBack  )  const [pure virtual]
 

Get the last point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual const GenPoint<value_type>& qgar::AbstractGenPointChain< T >::accessCurrent  )  const [pure virtual]
 

Get the current point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::RWSegmentVector::RWSegmentVector(), qgar::TgifFile::saveChain(), and qgar::DxfFile::saveChain().

template<class T>
virtual const GenPoint<value_type>& qgar::AbstractGenPointChain< T >::accessFront  )  const [pure virtual]
 

Get the first point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual const GenPoint<value_type>& qgar::AbstractGenPointChain< T >::accessNext  )  [pure virtual]
 

Get the successor of the current point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual const GenPoint<value_type>& qgar::AbstractGenPointChain< T >::accessPrevious  )  [pure virtual]
 

Get the predecessor of the current point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual GenPoint<value_type> qgar::AbstractGenPointChain< T >::back  )  const [pure virtual]
 

Get a copy of the last point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::WDSegmentList::PRIVATEperform().

template<class T>
virtual GenPoint<value_type> qgar::AbstractGenPointChain< T >::current  )  const [pure virtual]
 

Get a copy of the current point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::WDSegmentList::PRIVATEperform().

template<class T>
virtual bool qgar::AbstractGenPointChain< T >::empty  )  const [pure virtual]
 

Is current chain empty?

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::WDSegmentList::PRIVATEperform(), qgar::RWSegmentVector::RWSegmentVector(), and qgar::TgifFile::saveChain().

template<class T>
virtual GenPoint<value_type> qgar::AbstractGenPointChain< T >::front  )  const [pure virtual]
 

Get a copy of the first point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::WDSegmentList::PRIVATEperform().

template<class T>
virtual bool qgar::AbstractGenPointChain< T >::hasNext  )  const [pure virtual]
 

Is there a point after the current point?

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::WDSegmentList::PRIVATEperform(), and qgar::TgifFile::saveChain().

template<class T>
virtual bool qgar::AbstractGenPointChain< T >::hasPrevious  )  const [pure virtual]
 

Is there a point before the current point?

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual bool qgar::AbstractGenPointChain< T >::isAtBegin  )  const [pure virtual]
 

Does internal iterator points to the beginning of the chain?

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual bool qgar::AbstractGenPointChain< T >::isAtEnd  )  const [pure virtual]
 

Does internal iterator points to the end of the chain?

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::RWSegmentVector::RWSegmentVector(), and qgar::DxfFile::saveChain().

template<class T>
virtual void qgar::AbstractGenPointChain< T >::moveNext  )  [pure virtual]
 

Move to next point, that becomes the current point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::WDSegmentList::PRIVATEperform(), qgar::RWSegmentVector::RWSegmentVector(), qgar::TgifFile::saveChain(), and qgar::DxfFile::saveChain().

template<class T>
virtual void qgar::AbstractGenPointChain< T >::movePrevious  )  [pure virtual]
 

Move to previous point, that becomes the current point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual GenPoint<value_type> qgar::AbstractGenPointChain< T >::next  )  [pure virtual]
 

Get a copy of the successor of the current point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual GenPoint<value_type> qgar::AbstractGenPointChain< T >::previous  )  [pure virtual]
 

Get a copy of the predecessor of the current point.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual void qgar::AbstractGenPointChain< T >::push_back const GenPoint< value_type > &  aPt  )  [pure virtual]
 

Insert a point at the end of the chain.

Parameters:
aPt a point
The internal iterator remains valid after the operation.

Implemented in qgar::GenPointChain< T >.

template<class T>
virtual void qgar::AbstractGenPointChain< T >::push_front const GenPoint< value_type > &  aPt  )  [pure virtual]
 

Insert a point at the beginning of the chain.

Parameters:
aPt a point
The internal iterator remains valid after the operation.

Implemented in qgar::GenPointChain< T >.

template<class T>
virtual void qgar::AbstractGenPointChain< T >::reverse  )  [pure virtual]
 

Reverse the order of elements in the list.

The internal iterator remains valid once the operation is completed.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual void qgar::AbstractGenPointChain< T >::setToBegin  )  [pure virtual]
 

Set internal iterator to the beginning of the chain.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::WDSegmentList::PRIVATEperform(), qgar::RWSegmentVector::RWSegmentVector(), qgar::TgifFile::saveChain(), and qgar::DxfFile::saveChain().

template<class T>
virtual void qgar::AbstractGenPointChain< T >::setToEnd  )  [pure virtual]
 

Set internal iterator to the end of the chain.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

template<class T>
virtual int qgar::AbstractGenPointChain< T >::size  )  const [pure virtual]
 

Get chain size (number of points).

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.

Referenced by qgar::TgifFile::saveChain().

template<class T>
virtual std::list< GenPoint<value_type> > qgar::AbstractGenPointChain< T >::toPointList  )  const [pure virtual]
 

Get a (STL) list of the points of the chain.

Implemented in qgar::FreemanChain, and qgar::GenPointChain< T >.


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