Public Types | |
typedef StringLookupTablePropertySerializer | Self |
typedef BasePropertySerializer | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual TiXmlElement * | Serialize () |
Serializes given BaseProperty object. | |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
StringLookupTablePropertySerializer () | |
virtual | ~StringLookupTablePropertySerializer () |
Definition at line 30 of file mitkStringLookupTablePropertySerializer.cpp.
typedef itk::SmartPointer<const Self> mitk::StringLookupTablePropertySerializer::ConstPointer |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkStringLookupTablePropertySerializer.cpp.
typedef itk::SmartPointer<Self> mitk::StringLookupTablePropertySerializer::Pointer |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkStringLookupTablePropertySerializer.cpp.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkStringLookupTablePropertySerializer.cpp.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkStringLookupTablePropertySerializer.cpp.
mitk::StringLookupTablePropertySerializer::StringLookupTablePropertySerializer | ( | ) | [inline, protected] |
Definition at line 58 of file mitkStringLookupTablePropertySerializer.cpp.
{}
virtual mitk::StringLookupTablePropertySerializer::~StringLookupTablePropertySerializer | ( | ) | [inline, protected, virtual] |
Definition at line 59 of file mitkStringLookupTablePropertySerializer.cpp.
{}
virtual const char* mitk::StringLookupTablePropertySerializer::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BasePropertySerializer.
static Pointer mitk::StringLookupTablePropertySerializer::New | ( | ) | [static] |
virtual TiXmlElement* mitk::StringLookupTablePropertySerializer::Serialize | ( | ) | [inline, virtual] |
Serializes given BaseProperty object.
This should be overwritten by specific sub-classes.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 37 of file mitkStringLookupTablePropertySerializer.cpp.
References mitk::GenericLookupTable< T >::GetLookupTable(), mitk::GenericProperty< T >::GetValue(), TiXmlNode::LinkEndChild(), and TiXmlElement::SetAttribute().
{ const StringLookupTableProperty* prop = dynamic_cast<const StringLookupTableProperty*>(m_Property.GetPointer()); if (prop == NULL) return NULL; StringLookupTable lut = prop->GetValue(); //if (lut.IsNull()) // return NULL; // really? const StringLookupTable::LookupTableType& map = lut.GetLookupTable(); TiXmlElement* element = new TiXmlElement("StringLookupTable"); for (StringLookupTable::LookupTableType::const_iterator it = map.begin(); it != map.end(); ++it) { TiXmlElement* tableEntry = new TiXmlElement("LUTValue"); tableEntry->SetAttribute("id", it->first); tableEntry->SetAttribute("value", it->second); element->LinkEndChild( tableEntry ); } return element; }