Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Member Functions | Private Attributes

SgSortedArray< T, K, size > Class Template Reference

Sorted array. More...

#include <SgSortedArray.h>

List of all members.

Public Member Functions

 SgSortedArray ()
void AddItem (T elt, K key)
void SetToMin (T elt, K key)
void SetToMax (T elt, K key)
void SetTo (T elt, K key)
void ReduceSizeTo (int newSize)
void SortMaximize ()
void SortMinimize ()
void GetElements (SgVector< T > *listOfElts) const
void GetKeys (SgVector< K > *listOfKeys) const
operator[] (int index) const
GetKey (int index) const
int Size () const
bool IsEmpty () const
bool NonEmpty () const
bool IsFull () const

Private Member Functions

 SgSortedArray (const SgSortedArray &)
 not implemented
SgSortedArrayoperator= (const SgSortedArray &)
 not implemented

Private Attributes

int m_numElt
m_elt [size]
m_key [size]

Detailed Description

template<class T, class K, int size>
class SgSortedArray< T, K, size >

Sorted array.

Implements an array of type T elements that can be sorted by keys of type K. Class K needs to support comparison. Class T currently needs to be a simple type.

Definition at line 19 of file SgSortedArray.h.


Constructor & Destructor Documentation

template<class T , class K , int size>
SgSortedArray< T, K, size >::SgSortedArray (  ) 

Definition at line 22 of file SgSortedArray.h.

References SgSortedArray< T, K, size >::m_numElt.

template<class T , class K , int size>
SgSortedArray< T, K, size >::SgSortedArray ( const SgSortedArray< T, K, size > &   )  [private]

not implemented


Member Function Documentation

template<class T , class K , int size>
void SgSortedArray< T, K, size >::AddItem ( elt,
key 
)
template<class T , class K , int size>
void SgSortedArray< T, K, size >::GetElements ( SgVector< T > *  listOfElts  )  const
template<class T , class K , int size>
K SgSortedArray< T, K, size >::GetKey ( int  index  )  const

Definition at line 134 of file SgSortedArray.h.

References SgSortedArray< T, K, size >::m_key.

template<class T , class K , int size>
void SgSortedArray< T, K, size >::GetKeys ( SgVector< K > *  listOfKeys  )  const
template<class T , class K , int size>
bool SgSortedArray< T, K, size >::IsEmpty (  )  const

Definition at line 144 of file SgSortedArray.h.

References SgSortedArray< T, K, size >::m_numElt.

template<class T , class K , int size>
bool SgSortedArray< T, K, size >::IsFull (  )  const

Definition at line 154 of file SgSortedArray.h.

References SgSortedArray< T, K, size >::m_numElt.

template<class T , class K , int size>
bool SgSortedArray< T, K, size >::NonEmpty (  )  const

Definition at line 149 of file SgSortedArray.h.

References SgSortedArray< T, K, size >::m_numElt.

template<class T , class K , int size>
SgSortedArray& SgSortedArray< T, K, size >::operator= ( const SgSortedArray< T, K, size > &   )  [private]

not implemented

template<class T , class K , int size>
T SgSortedArray< T, K, size >::operator[] ( int  index  )  const

Definition at line 129 of file SgSortedArray.h.

References SgSortedArray< T, K, size >::m_elt.

template<class T , class K , int size>
void SgSortedArray< T, K, size >::ReduceSizeTo ( int  newSize  ) 

Definition at line 75 of file SgSortedArray.h.

References SgSortedArray< T, K, size >::m_numElt, and SG_ASSERT.

template<class T , class K , int size>
void SgSortedArray< T, K, size >::SetTo ( elt,
key 
)
template<class T , class K , int size>
void SgSortedArray< T, K, size >::SetToMax ( elt,
key 
)
template<class T , class K , int size>
void SgSortedArray< T, K, size >::SetToMin ( elt,
key 
)
template<class T , class K , int size>
int SgSortedArray< T, K, size >::Size (  )  const

Definition at line 139 of file SgSortedArray.h.

References SgSortedArray< T, K, size >::m_numElt.

template<class T , class K , int size>
void SgSortedArray< T, K, size >::SortMaximize (  ) 
template<class T , class K , int size>
void SgSortedArray< T, K, size >::SortMinimize (  ) 

Member Data Documentation

template<class T , class K , int size>
T SgSortedArray< T, K, size >::m_elt[size] [private]
template<class T , class K , int size>
K SgSortedArray< T, K, size >::m_key[size] [private]
template<class T , class K , int size>
int SgSortedArray< T, K, size >::m_numElt [private]

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


Sun Mar 13 2011 Doxygen 1.7.1