00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "freStatisticEntryDefinition.h"
00023 #include "freConvert.h"
00024
00025 namespace FREE
00026 {
00027
00031
00032 StatisticEntryDefinition&
00033 StatisticEntryDefinition::
00034 operator = (const StatisticEntryDefinition& rEntry)
00035 {
00036 if (this != &rEntry)
00037 {
00038 this->Reset();
00039 SetRefID(rEntry.GetRefID());
00040 SetIDPath(rEntry.GetIDPath());
00041 SetName(rEntry.GetName());
00042 SetDescription(rEntry.GetDescription());
00043 SetControllerID(rEntry.GetControllerID());
00044 };
00045
00046 return *this;
00047 };
00048
00049 StatisticEntryDefinition::
00050 StatisticEntryDefinition():XMLStreamObject(XMLTags::StatisticEntryDefinition)
00051 {
00052 Reset();
00053 };
00054
00055 StatisticEntryDefinition::
00056 ~StatisticEntryDefinition()
00057 {};
00058
00059 void
00060 StatisticEntryDefinition::
00061 Reset()
00062 {
00063 XMLStreamObject::Reset();
00064 m_sName = "";
00065 m_sDescription = "";
00066 m_sControllerID = "";
00067 m_sIDPath = "";
00068 m_RefID = 0;
00069 };
00070
00071 void
00072 StatisticEntryDefinition::
00073 SubElementLoadProcessing(const std::string& rsXMLSubTag, const std::string& rsXMLSubElement, const std::string& rsXMLSubData)
00074 {
00075 if (rsXMLSubTag == XMLTags::StatisticEntryDefName) m_sName = rsXMLSubData;
00076 else if (rsXMLSubTag == XMLTags::StatisticEntryDefDescription) m_sDescription = rsXMLSubData;
00077 else if (rsXMLSubTag == XMLTags::StatisticEntryDefControllerID) m_sControllerID = rsXMLSubData;
00078 else if (rsXMLSubTag == XMLTags::StatisticEntryDefIDPath) m_sIDPath = rsXMLSubData;
00079 else if (rsXMLSubTag == XMLTags::StatisticEntryReference) m_RefID = Convert::ToInt(rsXMLSubData);
00080 };
00081
00082 std::string
00083 StatisticEntryDefinition::
00084 SaveData(const unsigned int& iDepth, bool& bHasSubElements) const
00085 {
00086 std::string result;
00087 AddSubElement(result, XMLTags::StatisticEntryReference, Convert::ToStr(m_RefID), iDepth);
00088 AddSubElement(result, XMLTags::StatisticEntryDefName, m_sName, iDepth);
00089 AddSubElement(result, XMLTags::StatisticEntryDefControllerID, m_sControllerID, iDepth);
00090 AddSubElement(result, XMLTags::StatisticEntryDefIDPath, m_sIDPath, iDepth);
00091 AddSubElement(result, XMLTags::StatisticEntryDefDescription, m_sDescription, iDepth);
00092
00093 return result;
00094 };
00095
00096 }