Lumiverse  2.5
A framework for creating lighting control applications
Public Member Functions | List of all members
Lumiverse::LumiverseType Class Referenceabstract

This class is a wapper around a variety of different possible data types that might be needed by a Device. More...

#include <LumiverseType.h>

Inheritance diagram for Lumiverse::LumiverseType:
Inheritance graph
[legend]

Public Member Functions

virtual ~LumiverseType ()
 Destroys the object.
 
virtual string getTypeName ()=0
 Gets the name of the type. More...
 
virtual void reset ()=0
 Resets the data to a type-defined default.
 
virtual JSONNode toJSON (string name)=0
 Converts the type to a JSON object with the specified name. More...
 
virtual string asString ()=0
 Returns the value of the LumiverseType as a string. More...
 
virtual bool isDefault ()=0
 Returns true if the value is equal to the default value for the type.
 

Detailed Description

This class is a wapper around a variety of different possible data types that might be needed by a Device.

You can define a new type be deriving from this class, and then updating the functions in LumiverseTypeUtils

See also
LumiverseTypeUtils

Member Function Documentation

virtual string Lumiverse::LumiverseType::asString ( )
pure virtual

Returns the value of the LumiverseType as a string.

For easy debugging and printing of various values.

Implemented in Lumiverse::LumiverseOrientation, Lumiverse::LumiverseEnum, Lumiverse::LumiverseFloat, and Lumiverse::LumiverseColor.

virtual string Lumiverse::LumiverseType::getTypeName ( )
pure virtual

Gets the name of the type.

Each subclass definies this to uniquely identify the type.

Returns
String representing the type of the object

Implemented in Lumiverse::LumiverseEnum, Lumiverse::LumiverseColor, Lumiverse::LumiverseOrientation, and Lumiverse::LumiverseFloat.

virtual JSONNode Lumiverse::LumiverseType::toJSON ( string  name)
pure virtual

Converts the type to a JSON object with the specified name.

Required for proper serialiaztion.

Implemented in Lumiverse::LumiverseOrientation, Lumiverse::LumiverseEnum, Lumiverse::LumiverseFloat, and Lumiverse::LumiverseColor.


The documentation for this class was generated from the following file: