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

mitk::ColorPropertySerializer Class Reference

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

List of all members.

Public Types

typedef ColorPropertySerializer Self
typedef BasePropertySerializer Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetClassName () const
virtual TiXmlElementSerialize ()
 Serializes given BaseProperty object.

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 ColorPropertySerializer ()
virtual ~ColorPropertySerializer ()

Detailed Description

Definition at line 30 of file mitkColorPropertySerializer.cpp.


Member Typedef Documentation

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

Reimplemented from mitk::BasePropertySerializer.

Definition at line 34 of file mitkColorPropertySerializer.cpp.

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

Reimplemented from mitk::BasePropertySerializer.

Definition at line 34 of file mitkColorPropertySerializer.cpp.

Reimplemented from mitk::BasePropertySerializer.

Definition at line 34 of file mitkColorPropertySerializer.cpp.

Reimplemented from mitk::BasePropertySerializer.

Definition at line 34 of file mitkColorPropertySerializer.cpp.


Constructor & Destructor Documentation

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

Definition at line 53 of file mitkColorPropertySerializer.cpp.

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

Definition at line 54 of file mitkColorPropertySerializer.cpp.

{}

Member Function Documentation

virtual const char* mitk::ColorPropertySerializer::GetClassName (  ) const [virtual]

Reimplemented from mitk::BasePropertySerializer.

static Pointer mitk::ColorPropertySerializer::New (  ) [static]
virtual TiXmlElement* mitk::ColorPropertySerializer::Serialize (  ) [inline, virtual]

Serializes given BaseProperty object.

Returns:
the filename of the newly created file.

This should be overwritten by specific sub-classes.

Reimplemented from mitk::BasePropertySerializer.

Definition at line 37 of file mitkColorPropertySerializer.cpp.

References TiXmlElement::SetDoubleAttribute().

    {
      if (const ColorProperty* prop = dynamic_cast<const ColorProperty*>(m_Property.GetPointer()))
      {
        TiXmlElement* element = new TiXmlElement("color");
        Color color = prop->GetValue();
        element->SetDoubleAttribute("r", color[0]);
        element->SetDoubleAttribute("g", color[1]);
        element->SetDoubleAttribute("b", color[2]);
        return element;
      }
      else return NULL;
    }

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