00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00044 #include "../tinyxml/tinyxml.h"
00045
00046 #include "attribute.h"
00047
00048 #include "activation.h"
00049
00050 using namespace libsvx;
00051
00054 Activation::Activation(TiXmlElement & Element)
00055 :ElementPCData(Element,"activation")
00056 ,m_A_scheme(NULL)
00057 {
00058 assert(Element.Value().compare("activation") == 0);
00059
00060
00061 if (Element.Attribute("scheme") != NULL)
00062 {
00063 m_A_scheme = new Attribute(*Element.Attribute("scheme"),"scheme");
00064 }
00065 }
00066
00067 Activation::Activation(const Activation & a_activation)
00068 :ElementPCData(a_activation)
00069 {
00070 if (a_activation.m_A_scheme != NULL)
00071 m_A_scheme = new Attribute(*a_activation.m_A_scheme);
00072 else
00073 m_A_scheme = NULL;
00074 }
00075
00079 Activation::~Activation()
00080 {
00081 if (m_A_scheme != NULL)
00082 delete m_A_scheme;
00083 }
00084
00088 bool Activation::IsValid() const
00089 {
00090 return (m_A_scheme != NULL);
00091 }
00092
00093 TiXmlElement & Activation::XmlElement()
00094 {
00095 assert(m_Node != NULL);
00096
00097 ElementPCData::XmlElement();
00098
00099 if (m_A_scheme != NULL)
00100 m_A_scheme->XmlElement(*m_Node);
00101
00102 return *m_Node;
00103 }
00104