FREE::StatisticData Class Reference
[Statistics]

Class containing statistic values or further statistic entries. More...

#include <freStatisticData.h>

Inheritance diagram for FREE::StatisticData:

Inheritance graph
FREE::XMLStreamObject
[legend]
Collaboration diagram for FREE::StatisticData:

Collaboration graph
FREE::XMLStreamObject
[legend]

List of all members.

Public Types

typedef StatisticData Self
typedef itk::LightObject Superclass
typedef
itk::SmartPointer
< Self
Pointer
typedef
itk::SmartPointer
< const Self
ConstPointer
typedef
StatisticEntry::IDType 
IDType
typedef
StatisticEntry::EntriesType 
EntriesType

Public Member Functions

virtual const char * GetNameOfClass () const
virtual
::itk::LightObject::Pointer 
CreateAnother (void) const
StatisticDataoperator= (const StatisticData &entry)
StatisticEntry::Pointer CreateEntry ()
StatisticEntry::Pointer CreateChildEntry (const IDType &parentID)
StatisticEntry::Pointer PostCreateChildEntry (const IDType &parentID)
StatisticEntry::Pointer GetEntry (const IDType &entryID)
StatisticEntry::Pointer GetCurrentEntry ()
IDType GetCurrentEntryID () const
IDType GetLastClosedEntryID () const
IDType CloseEntry (const IDType &entryID)
void OpenEntry (const IDType &entryID)
void CloseEntries ()
virtual ~StatisticData ()
virtual void Reset ()
const EntriesTypeGetEntries () const
EntriesTypeGetEntries ()

Static Public Member Functions

static Pointer New (void)

Protected Member Functions

 StatisticData ()
StatisticEntrySearchEntry (StatisticEntry *pCurrentEntry, const IDType &entryID)
virtual void SubElementLoadProcessing (const std::string &rsXMLSubTag, const std::string &rsXMLSubElement, const std::string &rsXMLSubData)
virtual std::string SaveData (const unsigned int &iDepth, bool &bHasSubElements) const

Protected Attributes

IDType m_LastID
std::vector< IDTypem_EntryStack
IDType m_LastEntryID
StatisticEntry::Pointer m_smpRoot
clock_t m_StampOffset


Detailed Description

Class containing statistic values or further statistic entries.

StatisticEntries are used to structure the statistic log of an processing. Every child enty is within the time frame of an ancestor entry and is therefore a more detailed view at the ongoing process. Every entry has an unique ID and a reference ID for the dictonary.

Definition at line 41 of file freStatisticData.h.


Member Typedef Documentation

typedef StatisticData FREE::StatisticData::Self

Definition at line 44 of file freStatisticData.h.

typedef itk::LightObject FREE::StatisticData::Superclass

Definition at line 45 of file freStatisticData.h.

typedef itk::SmartPointer<Self> FREE::StatisticData::Pointer

Definition at line 46 of file freStatisticData.h.

typedef itk::SmartPointer<const Self> FREE::StatisticData::ConstPointer

Definition at line 47 of file freStatisticData.h.

typedef StatisticEntry::IDType FREE::StatisticData::IDType

Definition at line 50 of file freStatisticData.h.

typedef StatisticEntry::EntriesType FREE::StatisticData::EntriesType

Definition at line 54 of file freStatisticData.h.


Constructor & Destructor Documentation

FREE::StatisticData::~StatisticData (  )  [virtual]

Definition at line 79 of file freStatisticData.cxx.

References m_smpRoot.

FREE::StatisticData::StatisticData (  )  [protected]

Constructor.

Definition at line 110 of file freStatisticData.cxx.

References Reset().

Here is the call graph for this function:

FREE::StatisticData::ResetFREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntry


Member Function Documentation

virtual const char* FREE::StatisticData::GetNameOfClass (  )  const [inline, virtual]

Reimplemented from FREE::XMLStreamObject.

Definition at line 49 of file freStatisticData.h.

static Pointer FREE::StatisticData::New ( void   )  [inline, static]

Definition at line 50 of file freStatisticData.h.

Referenced by FREE::Statistics::Reset().

virtual ::itk::LightObject::Pointer FREE::StatisticData::CreateAnother ( void   )  const [inline, virtual]

Definition at line 50 of file freStatisticData.h.

StatisticData & FREE::StatisticData::operator= ( const StatisticData entry  ) 

Assignment operator.

Definition at line 136 of file freStatisticData.cxx.

References CreateEntry(), GetEntries(), m_smpRoot, and Reset().

Here is the call graph for this function:

FREE::StatisticData::CreateEntryFREE::StatisticData::GetEntriesFREE::StatisticData::ResetFREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntry

StatisticEntry::Pointer FREE::StatisticData::CreateEntry (  ) 

Implementation of FREE::StatisticData //////////////////////////////

Definition at line 37 of file freStatisticData.cxx.

References m_LastID, m_StampOffset, and FREE::StatisticEntry::New().

Referenced by FREE::StatisticEntry::CreateChildEntry(), FREE::StatisticEntry::operator=(), operator=(), FREE::StatisticEntry::PostCreateChildEntry(), FREE::StatisticEntry::SubElementLoadProcessing(), and SubElementLoadProcessing().

Here is the call graph for this function:

FREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntry

StatisticEntry::Pointer FREE::StatisticData::CreateChildEntry ( const IDType parentID  ) 

Creates a child entry by getting the parent entry and calling its CreateChildEntry method.

Parameters:
[in] parentID Unique ID of the parent entry that should get a new child entry.
Returns:
Smart pointer to the created entry.

Definition at line 45 of file freStatisticData.cxx.

References FREE::StatisticEntry::CreateChildEntry(), GetEntry(), and throwExceptionMacro.

Referenced by FREE::ComponentControllerBase< TControlledComponent >::AddStatisticEntry().

Here is the call graph for this function:

FREE::StatisticEntry::CreateChildEntryFREE::StatisticData::GetEntryFREE::StatisticData::CreateEntryFREE::TimeStampedObject::IsClosedFREE::StatisticData::OpenEntryFREE::StatisticEntry::PostCreateChildEntryFREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntryFREE::StatisticData::SearchEntryFREE::StatisticEntry::GetEntriesFREE::StatisticEntry::GetID

StatisticEntry::Pointer FREE::StatisticData::PostCreateChildEntry ( const IDType parentID  ) 

Creates a child entry by getting the parent entry and calling its PostCreateChildEntry method.

Parameters:
[in] parentID Unique ID of the parent entry that should get a new child entry.
Returns:
Smart pointer to the created entry.

Definition at line 55 of file freStatisticData.cxx.

References GetEntry(), FREE::StatisticEntry::PostCreateChildEntry(), and throwExceptionMacro.

Referenced by FREE::SetupOptimizationMetricMonitorBase< TResultClass >::EvaluationFinished().

Here is the call graph for this function:

FREE::StatisticData::GetEntryFREE::StatisticEntry::PostCreateChildEntryFREE::StatisticData::SearchEntryFREE::StatisticEntry::GetEntriesFREE::StatisticEntry::GetIDFREE::StatisticData::CreateEntryFREE::TimeStampedObject::IsClosedFREE::StatisticData::OpenEntryFREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntry

StatisticEntry::Pointer FREE::StatisticData::GetEntry ( const IDType entryID  ) 

Returns the entry with the passed ID. If no entry exits with this ID the pointer is NULL.

Parameters:
[in] entryID ID of the wanted entry

Definition at line 65 of file freStatisticData.cxx.

References m_smpRoot, and SearchEntry().

Referenced by CreateChildEntry(), GetCurrentEntry(), and PostCreateChildEntry().

Here is the call graph for this function:

FREE::StatisticData::SearchEntryFREE::StatisticEntry::GetEntriesFREE::StatisticEntry::GetID

StatisticEntry::Pointer FREE::StatisticData::GetCurrentEntry (  ) 

Returns the currently open entry of the data. It is the topmost entry in the entry stack.

Definition at line 180 of file freStatisticData.cxx.

References GetCurrentEntryID(), and GetEntry().

Here is the call graph for this function:

FREE::StatisticData::GetCurrentEntryIDFREE::StatisticData::GetEntryFREE::StatisticData::SearchEntryFREE::StatisticEntry::GetEntriesFREE::StatisticEntry::GetID

StatisticData::IDType FREE::StatisticData::GetCurrentEntryID (  )  const

Returns the ID of the currently open entry. It is the topmost entry in the entry stack.

Definition at line 193 of file freStatisticData.cxx.

References m_EntryStack.

Referenced by FREE::ComponentControllerBase< TControlledComponent >::AddStatisticEntry(), FREE::SetupOptimizationMetricMonitorBase< TResultClass >::EvaluationFinished(), and GetCurrentEntry().

StatisticData::IDType FREE::StatisticData::GetLastClosedEntryID (  )  const

Returns the ID of the entry that was closed last.

Definition at line 202 of file freStatisticData.cxx.

References m_LastEntryID.

StatisticData::IDType FREE::StatisticData::CloseEntry ( const IDType entryID  ) 

Removes the entry specified by the passed ID from the entry stack and all entries added after the specified entry. The function returns the new current entry (normally the preceeding sibling or the parent of the closed entry).

Definition at line 209 of file freStatisticData.cxx.

References m_EntryStack, and m_LastEntryID.

Referenced by FREE::StatisticEntry::CloseEntry().

void FREE::StatisticData::OpenEntry ( const IDType entryID  ) 

Adds the entry to the entry stack.

Definition at line 233 of file freStatisticData.cxx.

References m_EntryStack.

Referenced by FREE::StatisticEntry::CreateChildEntry(), and FREE::StatisticEntry::PostCreateChildEntry().

void FREE::StatisticData::CloseEntries (  ) 

Closes all entries if not closed.

Definition at line 73 of file freStatisticData.cxx.

References m_smpRoot.

void FREE::StatisticData::Reset (  )  [virtual]

Deletes all entries and resets creation time.

Reimplemented from FREE::XMLStreamObject.

Definition at line 86 of file freStatisticData.cxx.

References m_LastEntryID, m_LastID, m_smpRoot, m_StampOffset, and FREE::StatisticEntry::New().

Referenced by FREE::SetupOptimizationMetric::GetDecomposedValue(), FREE::SetupOptimizationMetric::GetDerivative(), FREE::SetupOptimizationMetric::GetValue(), FREE::SetupOptimizationMetric::GetValueAndDerivative(), operator=(), and StatisticData().

Here is the call graph for this function:

FREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntry

const StatisticData::EntriesType & FREE::StatisticData::GetEntries (  )  const

Definition at line 97 of file freStatisticData.cxx.

References m_smpRoot.

Referenced by operator=().

StatisticData::EntriesType & FREE::StatisticData::GetEntries (  ) 

Definition at line 104 of file freStatisticData.cxx.

References m_smpRoot.

StatisticEntry * FREE::StatisticData::SearchEntry ( StatisticEntry pCurrentEntry,
const IDType entryID 
) [protected]

Definition at line 117 of file freStatisticData.cxx.

References FREE::StatisticEntry::GetEntries(), and FREE::StatisticEntry::GetID().

Referenced by GetEntry().

Here is the call graph for this function:

FREE::StatisticEntry::GetEntriesFREE::StatisticEntry::GetID

void FREE::StatisticData::SubElementLoadProcessing ( const std::string &  rsXMLSubTag,
const std::string &  rsXMLSubElement,
const std::string &  rsXMLSubData 
) [protected, virtual]

Function is called by after the parser has extracted a new sub element out of the xml data string. The tag of the sub element is passed, along with its data and a string containing the total element (needed to call subsequent LoadFromString). To change the loading behaviour, this class should be reimplemented. This function is also called for plain text data of the element. In this case rsXMLTag is cXML_Text (an empty string), if not there is a real sub element in the data. Depending on the structure the text case (rsXMLTag==cXML_Text) could occure more then once.

Example:

 <Element>aaaaaa<SubElement>bbbbbb</Subelement>cccccc</Element>\n
This string passed as rsXMLData in a call of LoadFromXMLString() would cause 3 calls of SubElementLoadProcessing() with following parameters:
1. rsXMLTag == cXML_Text; rsXMLSubElement == "aaaaaa"; rsXMLSubData == "aaaaaa"
2. rsXMLTag == "Subelement"; rsXMLSubElement == "<SubElement>bbbbbb</Subelement>"; rsXMLSubData == "bbbbbb"
1. rsXMLTag == cXML_Text; rsXMLSubElement == "cccccc"; rsXMLSubElement == "cccccc"
Parameters:
[in] rsXMLSubTag Reference to the tag of xml to be loaded with the function call.
[in] rsXMLSubElement Reference to the whole element string (with attributes, start and end tag).
[in] rsXMLSubData Reference to the whole data of the xml element (without start and end tag)

Reimplemented from FREE::XMLStreamObject.

Definition at line 155 of file freStatisticData.cxx.

References CreateEntry(), and m_smpRoot.

Here is the call graph for this function:

FREE::StatisticData::CreateEntryFREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntry

std::string FREE::StatisticData::SaveData ( const unsigned int &  iDepth,
bool &  bHasSubElements 
) const [protected, virtual]

Function that returns the data of the object converted to a xml element. This function is called by SaveToString() to compose the whole xml string and should contain the data/value of the xml element couples.

Parameters:
[in] iDepth The depth of the data within the xml structure tree. Used to realize correct indentation of the formated data by AddIndentation().
[out] bHasSubElements Indicates whether the data string contains sub elements or just a plain value. By default bHasSubElements is true when the functon is called by SaveToString(). Reset the value to reset behavior of SaveToString. Example: <element attr1="1" attr2="a">aaaaaa<subElement>bbbbbb</subelement></element> For this xml string the function should return: "aaaaaa<subElement>bbbbbb</subElement>"
Returns:
Data of the xml as xml string.

Reimplemented from FREE::XMLStreamObject.

Definition at line 167 of file freStatisticData.cxx.

References FREE::XMLStreamObject::AddSubElement(), and m_smpRoot.

Here is the call graph for this function:

FREE::XMLStreamObject::AddSubElementFREE::XMLStreamObject::AddIndentationFREE::XMLStreamObject::CreateSimpleElementFREE::Convert::ToStr


Member Data Documentation

IDType FREE::StatisticData::m_LastID [protected]

The last used identifier. Will be increased if a new entry is created.

Definition at line 115 of file freStatisticData.h.

Referenced by CreateEntry(), and Reset().

std::vector<IDType> FREE::StatisticData::m_EntryStack [protected]

Definition at line 117 of file freStatisticData.h.

Referenced by CloseEntry(), GetCurrentEntryID(), and OpenEntry().

IDType FREE::StatisticData::m_LastEntryID [protected]

Definition at line 118 of file freStatisticData.h.

Referenced by CloseEntry(), GetLastClosedEntryID(), and Reset().

StatisticEntry::Pointer FREE::StatisticData::m_smpRoot [protected]

Definition at line 120 of file freStatisticData.h.

Referenced by CloseEntries(), GetEntries(), GetEntry(), operator=(), Reset(), SaveData(), SubElementLoadProcessing(), and ~StatisticData().

clock_t FREE::StatisticData::m_StampOffset [protected]

Definition at line 122 of file freStatisticData.h.

Referenced by CreateEntry(), and Reset().


The documentation for this class was generated from the following files:
Generated at Sat Oct 13 18:29:38 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000