Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

mitk::BoolLookupTablePropertyDeserializer Class Reference

Inheritance diagram for mitk::BoolLookupTablePropertyDeserializer:
Inheritance graph
[legend]
Collaboration diagram for mitk::BoolLookupTablePropertyDeserializer:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
BoolLookupTablePropertyDeserializer 
Self
typedef BasePropertyDeserializer Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetClassName () const
virtual BaseProperty::Pointer Deserialize (TiXmlElement *element)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 BoolLookupTablePropertyDeserializer ()
virtual ~BoolLookupTablePropertyDeserializer ()

Detailed Description

Definition at line 30 of file mitkBoolLookupTablePropertyDeserializer.cpp.


Member Typedef Documentation

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 34 of file mitkBoolLookupTablePropertyDeserializer.cpp.

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 34 of file mitkBoolLookupTablePropertyDeserializer.cpp.

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 34 of file mitkBoolLookupTablePropertyDeserializer.cpp.

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 34 of file mitkBoolLookupTablePropertyDeserializer.cpp.


Constructor & Destructor Documentation

mitk::BoolLookupTablePropertyDeserializer::BoolLookupTablePropertyDeserializer (  ) [inline, protected]

Definition at line 57 of file mitkBoolLookupTablePropertyDeserializer.cpp.

{}
virtual mitk::BoolLookupTablePropertyDeserializer::~BoolLookupTablePropertyDeserializer (  ) [inline, protected, virtual]

Definition at line 58 of file mitkBoolLookupTablePropertyDeserializer.cpp.

{}

Member Function Documentation

virtual BaseProperty::Pointer mitk::BoolLookupTablePropertyDeserializer::Deserialize ( TiXmlElement element ) [inline, virtual]

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 37 of file mitkBoolLookupTablePropertyDeserializer.cpp.

References TiXmlNode::FirstChildElement(), mitk::BoolLookupTableProperty::New(), TiXmlNode::NextSiblingElement(), mitk::GenericLookupTable< T >::SetTableValue(), and TIXML_WRONG_TYPE.

    {
      if (!element) 
        return NULL;

      BoolLookupTable lut;
      for( TiXmlElement* child = element->FirstChildElement("LUTValue"); child != NULL; child = child->NextSiblingElement("LUTValue"))
      {

        int xmlID;
        if (child->QueryIntAttribute("id", &xmlID) == TIXML_WRONG_TYPE)
          return NULL; // TODO: can we do a better error handling?
        BoolLookupTable::IdentifierType id = static_cast<BoolLookupTable::IdentifierType>(xmlID);
        BoolLookupTable::ValueType val = std::string(child->Attribute("value")) == std::string("true");
        lut.SetTableValue(id, val);
      }
      return BoolLookupTableProperty::New(lut).GetPointer();
    }
virtual const char* mitk::BoolLookupTablePropertyDeserializer::GetClassName (  ) const [virtual]

Reimplemented from mitk::BasePropertyDeserializer.

static Pointer mitk::BoolLookupTablePropertyDeserializer::New (  ) [static]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines