TerraLib 4.1
TeGeomComposite< T > Class Template Reference

TeGeomComposite: A template class for handling a hierarchy of geometries in TerraLib. More...

#include <TeGeometry.h>

Inheritance diagram for TeGeomComposite< T >:
TeVector TeGeometry

List of all members.

Public Types

typedef TeComposite< T >::iterator iterator
 An Iterator that enables forward traversal of a TeGeomComposite.
typedef T value_type
 The type of the value obtained by dereferencing a TeGeomComposite iterator.
typedef TeComposite< T >
::reverse_iterator 
reverse_iterator
 An Iterator that enables backward traversal of a TeGeomComposite.

Public Member Functions

 TeGeomComposite ()
 Constructor.
virtual ~TeGeomComposite ()
 Destructor.
 TeGeomComposite (const TeGeomComposite &other)
 Copy Constructor.
TeGeomCompositeoperator= (const TeGeomComposite &other)
 Operator =.
virtual string objectId () const
 Returns the identification of the object associated to this geometry.
virtual void objectId (const string &id)
 Sets the identification of the object associated to this geometry.
void copyElements (const TeGeomComposite &other)
 Copy two composites, duplicating elements (breaking handle/body idiom)
bool operator== (const TeGeomComposite &other) const
 Returns TRUE if two composites have exactly the same elements.
void add (const T &elem)
 Adds a new component.
bool erase (int i)
 Removes the i-th component.
bool erase (T &object)
 Removes an element.
TeComposite< T >::iterator erase (typename TeComposite< T >::iterator it)
 Removes the element pointed by an interator.
void clear ()
 Removes all elements.
unsigned int size () const
 Returns the size of the composite.
void reserve (int nelem)
 Reserves space for a given number of elements (reserve is available for vectors)
T & operator[] (int i) const
 Returns the i-th element.
T & first () const
 Returns the first element.
T & last () const
 Returns the i-th element.
bool empty () const
 Returns TRUE if composite is empty.
TeComposite< T >::iterator begin ()
 The iterator to the first position in the TeGeomComposite.
TeComposite< T >::iterator const begin () const
 The iterator to the first position in the TeGeomComposite.
TeComposite< T >::iterator end ()
 The iterator to the last plus one position in the TeGeomComposite.
TeComposite< T >::iterator const end () const
 The iterator to the last plus one position in the TeGeomComposite.
TeComposite< T >::reverse_iterator rbegin ()
 The iterator to the first position in the TeGeomComposite in reverse order.
TeComposite< T >::reverse_iterator rend ()
 The iterator to the last plus one position in the TeGeomComposite in reverse order.

Protected Attributes

TeComposite< T > * pImpl_
 Pointer to the implementation of a composite<T>

Detailed Description

template<class T>
class TeGeomComposite< T >

TeGeomComposite: A template class for handling a hierarchy of geometries in TerraLib.

Used for instantiating the different geometries. Provide a vector to store the 2D coordinates of a ring. Multiple copies of a geometry are allowed to share the same coordinates by means of a "handle/body" idiom.

See also:
TeLine2D TePolygon TeLineSet TePolygonSet

Member Typedef Documentation

template<class T>
typedef TeComposite<T>::iterator TeGeomComposite< T >::iterator

An Iterator that enables forward traversal of a TeGeomComposite.

template<class T>
typedef TeComposite<T>::reverse_iterator TeGeomComposite< T >::reverse_iterator

An Iterator that enables backward traversal of a TeGeomComposite.

template<class T>
typedef T TeGeomComposite< T >::value_type

The type of the value obtained by dereferencing a TeGeomComposite iterator.


Constructor & Destructor Documentation

template<class T>
TeGeomComposite< T >::TeGeomComposite ( ) [inline]

Constructor.

template<class T>
virtual TeGeomComposite< T >::~TeGeomComposite ( ) [inline, virtual]

Destructor.

template<class T>
TeGeomComposite< T >::TeGeomComposite ( const TeGeomComposite< T > &  other) [inline]

Copy Constructor.


Member Function Documentation

template<class T>
void TeGeomComposite< T >::add ( const T &  elem) [inline]

Adds a new component.

template<class T>
TeComposite<T>::iterator TeGeomComposite< T >::begin ( void  ) [inline]

The iterator to the first position in the TeGeomComposite.

template<class T>
TeComposite<T>::iterator const TeGeomComposite< T >::begin ( void  ) const [inline]

The iterator to the first position in the TeGeomComposite.

template<class T>
void TeGeomComposite< T >::clear ( ) [inline]

Removes all elements.

template<class T>
void TeGeomComposite< T >::copyElements ( const TeGeomComposite< T > &  other) [inline]

Copy two composites, duplicating elements (breaking handle/body idiom)

template<class T>
bool TeGeomComposite< T >::empty ( ) const [inline]

Returns TRUE if composite is empty.

template<class T>
TeComposite<T>::iterator TeGeomComposite< T >::end ( void  ) [inline]

The iterator to the last plus one position in the TeGeomComposite.

template<class T>
TeComposite<T>::iterator const TeGeomComposite< T >::end ( void  ) const [inline]

The iterator to the last plus one position in the TeGeomComposite.

template<class T>
TeComposite<T>::iterator TeGeomComposite< T >::erase ( typename TeComposite< T >::iterator  it) [inline]

Removes the element pointed by an interator.

template<class T>
bool TeGeomComposite< T >::erase ( T &  object) [inline]

Removes an element.

template<class T>
bool TeGeomComposite< T >::erase ( int  i) [inline]

Removes the i-th component.

template<class T>
T& TeGeomComposite< T >::first ( ) const [inline]

Returns the first element.

template<class T>
T& TeGeomComposite< T >::last ( ) const [inline]

Returns the i-th element.

template<class T>
virtual string TeGeomComposite< T >::objectId ( ) const [inline, virtual]

Returns the identification of the object associated to this geometry.

Reimplemented from TeGeometry.

Reimplemented in TeLine2D.

template<class T>
virtual void TeGeomComposite< T >::objectId ( const string id) [inline, virtual]

Sets the identification of the object associated to this geometry.

Reimplemented from TeGeometry.

Reimplemented in TeLine2D.

template<class T>
TeGeomComposite& TeGeomComposite< T >::operator= ( const TeGeomComposite< T > &  other) [inline]

Operator =.

template<class T>
bool TeGeomComposite< T >::operator== ( const TeGeomComposite< T > &  other) const [inline]

Returns TRUE if two composites have exactly the same elements.

template<class T>
T& TeGeomComposite< T >::operator[] ( int  i) const [inline]

Returns the i-th element.

template<class T>
TeComposite<T>::reverse_iterator TeGeomComposite< T >::rbegin ( ) [inline]

The iterator to the first position in the TeGeomComposite in reverse order.

template<class T>
TeComposite<T>::reverse_iterator TeGeomComposite< T >::rend ( ) [inline]

The iterator to the last plus one position in the TeGeomComposite in reverse order.

template<class T>
void TeGeomComposite< T >::reserve ( int  nelem) [inline]

Reserves space for a given number of elements (reserve is available for vectors)

template<class T>
unsigned int TeGeomComposite< T >::size ( ) const [inline, virtual]

Returns the size of the composite.

Reimplemented from TeGeometry.


Member Data Documentation

template<class T>
TeComposite<T>* TeGeomComposite< T >::pImpl_ [protected]

Pointer to the implementation of a composite<T>


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines