GTXabsl2ProfilerNameTable Class Reference

#include <GTXabsl2Profiler.h>

List of all members.

Public Member Functions

 GTXabsl2ProfilerNameTable ()
 ~GTXabsl2ProfilerNameTable ()
void init (int length_)
void clear ()
int getOptionPosition (const std::string optionName) const
int getStatePosition (const std::string optionName, const std::string state)
void append (const std::string optionName, const std::vector< std::string > states, const std::vector< std::string > params, int depth)
void setElement (int pos, GTXabsl2ProfilerNameTableEntry value)
int getSize () const
GTXabsl2ProfilerNameTableEntryoperator[] (int pos) const
bool exists (const std::string optionName, const std::string stateName) const
bool existsOption (const std::string option)

Protected Member Functions

int find (const std::string optionName, const std::string state) const
int findState (const std::string optionName, const std::string state) const
int findOption (const std::string optionName) const

Private Attributes

GTXabsl2ProfilerNameTableEntrydata
int usedSize
int length


Detailed Description

Definition at line 75 of file GTXabsl2Profiler.h.


Constructor & Destructor Documentation

GTXabsl2ProfilerNameTable::GTXabsl2ProfilerNameTable (  )  [inline]

Constructor Initializes all members with 0.

Definition at line 87 of file GTXabsl2Profiler.h.

GTXabsl2ProfilerNameTable::~GTXabsl2ProfilerNameTable (  )  [inline]

Destructor Deletes the data

Definition at line 93 of file GTXabsl2Profiler.h.

References data.


Member Function Documentation

void GTXabsl2ProfilerNameTable::append ( const std::string  optionName,
const std::vector< std::string >  states,
const std::vector< std::string >  params,
int  depth 
) [inline]

The function appends a new GTXabsl2ProfilerNameTableEntry to the array.

Parameters:
optionName A string label for the option..
states The names of the state in the corresponding option.
params The names of the parameters for this option.
depth The maximal depth of this Entry/Option in the option tree.

Definition at line 149 of file GTXabsl2Profiler.h.

References data, getSize(), length, and usedSize.

Referenced by GTXabsl2Profiler::importLogFile(), and GTXabsl2Profiler::registerOptions().

void GTXabsl2ProfilerNameTable::clear (  )  [inline]

Clears the array

Definition at line 112 of file GTXabsl2Profiler.h.

References data, length, and usedSize.

Referenced by GTXabsl2Profiler::importLogFile().

bool GTXabsl2ProfilerNameTable::exists ( const std::string  optionName,
const std::string  stateName 
) const [inline]

Returns whether an element for the given name exists

Parameters:
optionName Name of the option searched for
stateName Name of the state that in conjunction with optionName makes the request unique

Definition at line 198 of file GTXabsl2Profiler.h.

References find().

Referenced by GTXabsl2Profiler::doProfiling(), and GTXabsl2Profiler::registerOptions().

bool GTXabsl2ProfilerNameTable::existsOption ( const std::string  option  )  [inline]

Returns whether an element for the given name exists

Parameters:
option Name of the option searched for

Definition at line 206 of file GTXabsl2Profiler.h.

References findOption().

Referenced by GTXabsl2Profiler::getDepth(), and GTXabsl2Profiler::registerOptions().

int GTXabsl2ProfilerNameTable::find ( const std::string  optionName,
const std::string  state 
) const [inline, protected]

Finds the index of an element with the given names.

Returns:
The index of the element of -1 if the name does not exist.

Definition at line 215 of file GTXabsl2Profiler.h.

References data, getSize(), and GTXabsl2ProfilerNameTableEntry::states.

Referenced by exists().

int GTXabsl2ProfilerNameTable::findOption ( const std::string  optionName  )  const [inline, protected]

Finds the index of an element with the given names.

Returns:
The index of the element of -1 if the name does not exist.

Definition at line 253 of file GTXabsl2Profiler.h.

References data, and getSize().

Referenced by existsOption(), and getOptionPosition().

int GTXabsl2ProfilerNameTable::findState ( const std::string  optionName,
const std::string  state 
) const [inline, protected]

Finds the index of an element with the given names.

Returns:
The index of the element of -1 if the name does not exist.

Definition at line 234 of file GTXabsl2Profiler.h.

References data, getSize(), and int().

Referenced by getStatePosition().

int GTXabsl2ProfilerNameTable::getOptionPosition ( const std::string  optionName  )  const [inline]

Returns the Position for a given optionname Note that the function crashes if the element does not exist.

Definition at line 126 of file GTXabsl2Profiler.h.

References findOption().

Referenced by GTXabsl2Profiler::doDepthCount(), GTXabsl2Profiler::doProfiling(), and GTXabsl2Profiler::getDepth().

int GTXabsl2ProfilerNameTable::getSize (  )  const [inline]

The function returns the number of elements in the array.

Returns:
The length of the list.

Definition at line 182 of file GTXabsl2Profiler.h.

References usedSize.

Referenced by append(), find(), findOption(), findState(), GTXabsl2Profiler::getDepth(), GTXabsl2Profiler::getOptionName(), GTXabsl2Profiler::getStateName(), and GTXabsl2Profiler::writeNameTableToStream().

int GTXabsl2ProfilerNameTable::getStatePosition ( const std::string  optionName,
const std::string  state 
) [inline]

Returns the Position for a given state within the option Note that the function crashes if the element does not exist.

Parameters:
optionName Name of the option the state is in
state Name of the state the position is returned for
Returns:
The Position of the state within NameTableEntry

Definition at line 138 of file GTXabsl2Profiler.h.

References findState().

Referenced by GTXabsl2Profiler::doProfiling().

void GTXabsl2ProfilerNameTable::init ( int  length_  )  [inline]

Initializes the Array to a given length

Parameters:
length_ The length of the initialised array

Definition at line 102 of file GTXabsl2Profiler.h.

References data, length, and usedSize.

Referenced by GTXabsl2Profiler::init().

GTXabsl2ProfilerNameTableEntry& GTXabsl2ProfilerNameTable::operator[] ( int  pos  )  const [inline]

Returns the value for a given array position. Note that the function crashes if the required position is bigger than the size of the array.

Definition at line 189 of file GTXabsl2Profiler.h.

References data.

void GTXabsl2ProfilerNameTable::setElement ( int  pos,
GTXabsl2ProfilerNameTableEntry  value 
) [inline]

The function sets the value of an element in the array. Note that the function crashes if the element does not exist.

Parameters:
pos The position of the element in the array.
value The new element.

Definition at line 173 of file GTXabsl2Profiler.h.

References data.


Member Data Documentation

GTXabsl2ProfilerNameTableEntry* GTXabsl2ProfilerNameTable::data [private]

The array

Definition at line 78 of file GTXabsl2Profiler.h.

Referenced by append(), clear(), find(), findOption(), findState(), init(), operator[](), setElement(), and ~GTXabsl2ProfilerNameTable().

int GTXabsl2ProfilerNameTable::length [private]

Definition at line 82 of file GTXabsl2Profiler.h.

Referenced by append(), clear(), and init().

int GTXabsl2ProfilerNameTable::usedSize [private]

The number of elements in the array

Definition at line 82 of file GTXabsl2Profiler.h.

Referenced by append(), clear(), getSize(), and init().


The documentation for this class was generated from the following file:
Generated on Thu Dec 7 01:36:48 2006 for DT2005.panorama by  doxygen 1.4.7