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

GTXabsl2ProfilerNameTable Class Reference

#include <GTXabsl2Profiler.h>

Collaboration diagram for GTXabsl2ProfilerNameTable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GTXabsl2ProfilerNameTable ()
 Constructor Initializes all members with 0.

 ~GTXabsl2ProfilerNameTable ()
 Destructor Deletes the data.

void init (int length_)
 Initializes the Array to a given length.

void clear ()
 Clears the array.

int getOptionPosition (const std::string optionName) const
 Returns the Position for a given optionname Note that the function crashes if the element does not exist.

int getStatePosition (const std::string optionName, const std::string state)
 Returns the Position for a given state within the option Note that the function crashes if the element does not exist.

void append (const std::string optionName, const std::vector< std::string > states, const std::vector< std::string > params, int depth)
 The function appends a new GTXabsl2ProfilerNameTableEntry to the array.

void setElement (int pos, GTXabsl2ProfilerNameTableEntry value)
 The function sets the value of an element in the array.

int getSize () const
 The function returns the number of elements in the array.

GTXabsl2ProfilerNameTableEntryoperator[] (int pos) const
 Returns the value for a given array position.

bool exists (const std::string optionName, const std::string stateName) const
 Returns whether an element for the given name exists.

bool existsOption (const std::string option)
 Returns whether an element for the given name exists.


Protected Member Functions

int find (const std::string optionName, const std::string state) const
 Finds the index of an element with the given names.

int findState (const std::string optionName, const std::string state) const
 Finds the index of an element with the given names.

int findOption (const std::string optionName) const
 Finds the index of an element with the given names.


Private Attributes

GTXabsl2ProfilerNameTableEntrydata
 The array.

int usedSize
 The number of elements in the array.

int length
 The number of elements in the array.


Constructor & Destructor Documentation

GTXabsl2ProfilerNameTable::GTXabsl2ProfilerNameTable  )  [inline]
 

Constructor Initializes all members with 0.

Definition at line 87 of file GTXabsl2Profiler.h.

References usedSize.

GTXabsl2ProfilerNameTable::~GTXabsl2ProfilerNameTable  )  [inline]
 

Destructor Deletes the data.

Definition at line 93 of file GTXabsl2Profiler.h.


Member Function Documentation

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 usedSize.

Referenced by GTXabsl2Profiler::init().

void GTXabsl2ProfilerNameTable::clear  )  [inline]
 

Clears the array.

Definition at line 112 of file GTXabsl2Profiler.h.

References usedSize.

Referenced by GTXabsl2Profiler::importLogFile().

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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 getSize(), and usedSize.

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

Here is the call graph for this function:

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.

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().

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.

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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 getSize(), GTXabsl2ProfilerNameTableEntry::optionName, and GTXabsl2ProfilerNameTableEntry::states.

Referenced by exists().

Here is the call graph for this function:

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 getSize(), GTXabsl2ProfilerNameTableEntry::optionName, and GTXabsl2ProfilerNameTableEntry::states.

Referenced by getStatePosition().

Here is the call graph for this function:

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 getSize(), and GTXabsl2ProfilerNameTableEntry::optionName.

Referenced by existsOption(), and getOptionPosition().

Here is the call graph for this function:


Member Data Documentation

GTXabsl2ProfilerNameTableEntry* GTXabsl2ProfilerNameTable::data [private]
 

The array.

Definition at line 78 of file GTXabsl2Profiler.h.

int GTXabsl2ProfilerNameTable::usedSize [private]
 

The number of elements in the array.

Definition at line 82 of file GTXabsl2Profiler.h.

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

int GTXabsl2ProfilerNameTable::length [private]
 

The number of elements in the array.

Definition at line 82 of file GTXabsl2Profiler.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 23 20:08:22 2004 for GT2004 by doxygen 1.3.6