automotive-message-broker  0.12
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
AbstractPropertyType Class Referenceabstract
Inheritance diagram for AbstractPropertyType:
BasicPropertyType< T > ListPropertyType< T > MapPropertyType< T, N > StringPropertyType

Public Types

enum  Priority { Normal = 0, Low, High, Instant }
 The Priority enum describes prority of the property type. More...
 

Public Member Functions

 AbstractPropertyType (std::string property)
 
virtual std::string toString () const =0
 toString More...
 
virtual void fromString (std::string)=0
 fromString converts from string value
 
virtual GVariant * toVariant ()=0
 toVariant More...
 
virtual void fromVariant (GVariant *)=0
 fromVariant converts GVariant value into compatible native value. Caller owns GVariant argument.
 
virtual AbstractPropertyTypecopy ()=0
 copy More...
 
virtual void quickCopy (AbstractPropertyType *other)
 quickCopy is intended as a way to quickly copy the often changing bits from one abstract property to another It assumes that the properties are almost identical in name, source, and zone. More...
 
bool operator== (AbstractPropertyType &other)
 
bool operator!= (AbstractPropertyType &other)
 
virtual void setValue (boost::any val)
 setValue More...
 
template<typename T >
value () const
 value() native value. Does not use type coercion. Will throw if types do not match.
 
boost::any anyValue ()
 anyValue More...
 

Public Attributes

std::string name
 name Property name. More...
 
double timestamp
 timestamp. Timestamp when the value was last updated by the system. This is updated automatically any time setValue() is called More...
 
int32_t sequence
 sequence internal counter. Useful as a unique indentifier. values is -1 if not used (default).
 
std::string sourceUuid
 sourceUuid uuid of the source that produced this property. This is set by the routingengine if left unmodified.
 
Zone::Type zone
 zone that the property is situated in.
 
Priority priority
 priority is used to tell the routing engine how to prioritize routing the value to plugins. setting this value to AbstractPropertyType::Instant will tell the routing engine to immedietly route the value without any reliance on the mainloop. Instant priority is NOT thread safe. Default priority is AbstractPropertyType::Normal.
 
std::vector< std::function
< void(AbstractPropertyType *)> > 
destroyed
 destroyed is called if this property is destroyed.
 

Protected Attributes

boost::any mValue
 

Member Enumeration Documentation

The Priority enum describes prority of the property type.

Enumerator
Normal 

normal priority. This is default

Low 

Low priority.

High 

High priority

Instant 

Instant. Using this priority is not thread safe. This is typically used for Properties that need to be deterministic.

Member Function Documentation

boost::any AbstractPropertyType::anyValue ( )
inline

anyValue

Returns
boost::any value
virtual AbstractPropertyType* AbstractPropertyType::copy ( )
pure virtual
virtual void AbstractPropertyType::quickCopy ( AbstractPropertyType other)
inlinevirtual

quickCopy is intended as a way to quickly copy the often changing bits from one abstract property to another It assumes that the properties are almost identical in name, source, and zone.

Parameters
otherthe property to copy from
virtual void AbstractPropertyType::setValue ( boost::any  val)
inlinevirtual

setValue

Parameters
valboost::any value. NOTE: boost::any does not accept type coercion. Types must match exactly with native type. (ie, don't use "int" if the native type is "uint")

Reimplemented in BasicPropertyType< T >.

virtual std::string AbstractPropertyType::toString ( ) const
pure virtual

toString

Returns
strigified value

Implemented in ListPropertyType< T >, StringPropertyType, BasicPropertyType< T >, and MapPropertyType< T, N >.

virtual GVariant* AbstractPropertyType::toVariant ( )
pure virtual

toVariant

Returns
GVariant representation of value. Caller must unref the returned GVariant

Implemented in ListPropertyType< T >, StringPropertyType, BasicPropertyType< T >, and MapPropertyType< T, N >.

Member Data Documentation

std::string AbstractPropertyType::name

name Property name.

See Also
VehicleProperty for built-in supported property names
double AbstractPropertyType::timestamp

timestamp. Timestamp when the value was last updated by the system. This is updated automatically any time setValue() is called

See Also
amb::currentTime()
setValue()

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