#include <freStatisticData.h>


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 |
| StatisticData & | operator= (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 EntriesType & | GetEntries () const |
| EntriesType & | GetEntries () |
Static Public Member Functions | |
| static Pointer | New (void) |
Protected Member Functions | |
| StatisticData () | |
| StatisticEntry * | SearchEntry (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< IDType > | m_EntryStack |
| IDType | m_LastEntryID |
| StatisticEntry::Pointer | m_smpRoot |
| clock_t | m_StampOffset |
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.
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.
Definition at line 50 of file freStatisticData.h.
Definition at line 54 of file freStatisticData.h.
| FREE::StatisticData::~StatisticData | ( | ) | [virtual] |
| FREE::StatisticData::StatisticData | ( | ) | [protected] |
Constructor.
Definition at line 110 of file freStatisticData.cxx.
References Reset().

| virtual const char* FREE::StatisticData::GetNameOfClass | ( | ) | const [inline, virtual] |
| static Pointer FREE::StatisticData::New | ( | void | ) | [inline, static] |
| 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().

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

| StatisticEntry::Pointer FREE::StatisticData::CreateChildEntry | ( | const IDType & | parentID | ) |
Creates a child entry by getting the parent entry and calling its CreateChildEntry method.
| [in] | parentID | Unique ID of the parent entry that should get a new child entry. |
Definition at line 45 of file freStatisticData.cxx.
References FREE::StatisticEntry::CreateChildEntry(), GetEntry(), and throwExceptionMacro.
Referenced by FREE::ComponentControllerBase< TControlledComponent >::AddStatisticEntry().

| StatisticEntry::Pointer FREE::StatisticData::PostCreateChildEntry | ( | const IDType & | parentID | ) |
Creates a child entry by getting the parent entry and calling its PostCreateChildEntry method.
| [in] | parentID | Unique ID of the parent entry that should get a new child entry. |
Definition at line 55 of file freStatisticData.cxx.
References GetEntry(), FREE::StatisticEntry::PostCreateChildEntry(), and throwExceptionMacro.
Referenced by FREE::SetupOptimizationMetricMonitorBase< TResultClass >::EvaluationFinished().

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

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

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

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

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

| 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.
| [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>" |
Reimplemented from FREE::XMLStreamObject.
Definition at line 167 of file freStatisticData.cxx.
References FREE::XMLStreamObject::AddSubElement(), and m_smpRoot.

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().
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] |
1.5.3 written by Dimitri van Heesch,
© 1997-2000