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

mitk::ColorPropertyDeserializer Class Reference

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

List of all members.

Public Types

typedef ColorPropertyDeserializer 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

 ColorPropertyDeserializer ()
virtual ~ColorPropertyDeserializer ()

Detailed Description

Definition at line 30 of file mitkColorPropertyDeserializer.cpp.


Member Typedef Documentation

typedef itk::SmartPointer<const Self> mitk::ColorPropertyDeserializer::ConstPointer

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 34 of file mitkColorPropertyDeserializer.cpp.

typedef itk::SmartPointer<Self> mitk::ColorPropertyDeserializer::Pointer

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 34 of file mitkColorPropertyDeserializer.cpp.

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 34 of file mitkColorPropertyDeserializer.cpp.

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 34 of file mitkColorPropertyDeserializer.cpp.


Constructor & Destructor Documentation

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

Definition at line 51 of file mitkColorPropertyDeserializer.cpp.

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

Definition at line 52 of file mitkColorPropertyDeserializer.cpp.

{}

Member Function Documentation

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

Reimplemented from mitk::BasePropertyDeserializer.

Definition at line 37 of file mitkColorPropertyDeserializer.cpp.

References mitk::ColorProperty::New(), TiXmlElement::QueryFloatAttribute(), and TIXML_SUCCESS.

    {
      if (!element) return NULL;

      Color c;
      if ( element->QueryFloatAttribute( "r", &c[0] ) != TIXML_SUCCESS ) return NULL;
      if ( element->QueryFloatAttribute( "g", &c[1] ) != TIXML_SUCCESS ) return NULL;
      if ( element->QueryFloatAttribute( "b", &c[2] ) != TIXML_SUCCESS ) return NULL;

      return ColorProperty::New( c ).GetPointer();
    }
virtual const char* mitk::ColorPropertyDeserializer::GetClassName (  ) const [virtual]

Reimplemented from mitk::BasePropertyDeserializer.

static Pointer mitk::ColorPropertyDeserializer::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