Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::FaceArray< T > Class Template Reference

Dynamic arrays indexed with faces of a combinatorial embedding. More...

#include <FaceArray.h>

Inheritance diagram for ogdf::FaceArray< T >:

ogdf::Array< T > ogdf::FaceArrayBase

List of all members.

Public Member Functions

 FaceArray ()
 Constructs an empty face array associated with no combinatorial embedding.
 FaceArray (const ConstCombinatorialEmbedding &E)
 Constructs a face array associated with E.
 FaceArray (const ConstCombinatorialEmbedding &E, const T &x)
 Constructs a face array associated with E.
 FaceArray (const FaceArray< T > &A)
 Constructs an face array that is a copy of A.
bool valid () const
 Returns true iff the array is associated with a combinatorial embedding.
const ConstCombinatorialEmbeddingembeddingOf () const
 Returns a pointer to the associated combinatorial embedding.
const T & operator[] (face f) const
 Returns a reference to the element with index f.
T & operator[] (face f)
 Returns a reference to the element with index f.
const T & operator[] (int index) const
 Returns a reference to the element with index index.
T & operator[] (int index)
 Returns a reference to the element with index index.
FaceArray< T > & operator= (const FaceArray< T > &a)
 Assignment operator.
void init ()
 Reinitializes the array. Associates the array with no combinatorial embedding.
void init (const ConstCombinatorialEmbedding &E)
 Reinitializes the array. Associates the array with E.
void init (const ConstCombinatorialEmbedding &E, const T &x)
 Reinitializes the array. Associates the array with E.
void fill (const T &x)
 Sets all array elements to x.
void * operator new (size_t nBytes)
void * operator new (size_t, void *p)
void operator delete (void *p, size_t nBytes)

Private Member Functions

virtual void enlargeTable (int newTableSize)
 Virtual function called when table size has to be enlarged.
virtual void reinit (int initTableSize)
 Virtual function called when table has to be reinitialized.

Private Attributes

m_x
 The default value for array elements.


Detailed Description

template<class T>
class ogdf::FaceArray< T >

Dynamic arrays indexed with faces of a combinatorial embedding.

Face arrays adjust their table size automatically when the combinatorial embedding grows.

Definition at line 117 of file FaceArray.h.


Constructor & Destructor Documentation

template<class T>
ogdf::FaceArray< T >::FaceArray (  )  [inline]

Constructs an empty face array associated with no combinatorial embedding.

Definition at line 122 of file FaceArray.h.

template<class T>
ogdf::FaceArray< T >::FaceArray ( const ConstCombinatorialEmbedding E  )  [inline]

Constructs a face array associated with E.

Definition at line 124 of file FaceArray.h.

template<class T>
ogdf::FaceArray< T >::FaceArray ( const ConstCombinatorialEmbedding E,
const T &  x 
) [inline]

Constructs a face array associated with E.

Parameters:
E is the associated combinatorial embedding.
x is the default value for all array elements.

Definition at line 131 of file FaceArray.h.

template<class T>
ogdf::FaceArray< T >::FaceArray ( const FaceArray< T > &  A  )  [inline]

Constructs an face array that is a copy of A.

Associates the array with the same combinatorial embedding as A and copies all elements.

Definition at line 138 of file FaceArray.h.


Member Function Documentation

template<class T>
bool ogdf::FaceArray< T >::valid (  )  const [inline]

Returns true iff the array is associated with a combinatorial embedding.

Definition at line 141 of file FaceArray.h.

template<class T>
const ConstCombinatorialEmbedding* ogdf::FaceArray< T >::embeddingOf (  )  const [inline]

Returns a pointer to the associated combinatorial embedding.

Definition at line 144 of file FaceArray.h.

template<class T>
const T& ogdf::FaceArray< T >::operator[] ( face  f  )  const [inline]

Returns a reference to the element with index f.

Definition at line 149 of file FaceArray.h.

template<class T>
T& ogdf::FaceArray< T >::operator[] ( face  f  )  [inline]

Returns a reference to the element with index f.

Definition at line 155 of file FaceArray.h.

template<class T>
const T& ogdf::FaceArray< T >::operator[] ( int  index  )  const [inline]

Returns a reference to the element with index index.

Attention:
Make sure that index is a valid index for a face in the associated combinatorial embedding!

Reimplemented from ogdf::Array< T >.

Definition at line 165 of file FaceArray.h.

template<class T>
T& ogdf::FaceArray< T >::operator[] ( int  index  )  [inline]

Returns a reference to the element with index index.

Attention:
Make sure that index is a valid index for a face in the associated combinatorial embedding!

Reimplemented from ogdf::Array< T >.

Definition at line 174 of file FaceArray.h.

template<class T>
FaceArray<T>& ogdf::FaceArray< T >::operator= ( const FaceArray< T > &  a  )  [inline]

Assignment operator.

Definition at line 179 of file FaceArray.h.

template<class T>
void ogdf::FaceArray< T >::init (  )  [inline]

Reinitializes the array. Associates the array with no combinatorial embedding.

Reimplemented from ogdf::Array< T >.

Definition at line 187 of file FaceArray.h.

template<class T>
void ogdf::FaceArray< T >::init ( const ConstCombinatorialEmbedding E  )  [inline]

Reinitializes the array. Associates the array with E.

Definition at line 192 of file FaceArray.h.

template<class T>
void ogdf::FaceArray< T >::init ( const ConstCombinatorialEmbedding E,
const T &  x 
) [inline]

Reinitializes the array. Associates the array with E.

Parameters:
E is the associated combinatorial embedding.
x is the default value.

Definition at line 201 of file FaceArray.h.

template<class T>
void ogdf::FaceArray< T >::fill ( const T &  x  )  [inline]

Sets all array elements to x.

Reimplemented from ogdf::Array< T >.

Definition at line 206 of file FaceArray.h.

template<class T>
virtual void ogdf::FaceArray< T >::enlargeTable ( int  newTableSize  )  [inline, private, virtual]

Virtual function called when table size has to be enlarged.

Implements ogdf::FaceArrayBase.

Definition at line 213 of file FaceArray.h.

template<class T>
virtual void ogdf::FaceArray< T >::reinit ( int  initTableSize  )  [inline, private, virtual]

Virtual function called when table has to be reinitialized.

Implements ogdf::FaceArrayBase.

Definition at line 217 of file FaceArray.h.

template<class T>
void* ogdf::FaceArray< T >::operator new ( size_t  nBytes  )  [inline]

Reimplemented from ogdf::Array< T >.

Definition at line 221 of file FaceArray.h.

template<class T>
void* ogdf::FaceArray< T >::operator new ( size_t  ,
void *  p 
) [inline]

Reimplemented from ogdf::Array< T >.

Definition at line 221 of file FaceArray.h.

template<class T>
void ogdf::FaceArray< T >::operator delete ( void *  p,
size_t  nBytes 
) [inline]

Reimplemented from ogdf::Array< T >.

Definition at line 221 of file FaceArray.h.


Member Data Documentation

template<class T>
T ogdf::FaceArray< T >::m_x [private]

The default value for array elements.

Definition at line 118 of file FaceArray.h.


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

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:07 2007 by doxygen 1.5.4.