automotive-message-broker  0.14.0
Public Member Functions | List of all members
ListPropertyType< T > Class Template Reference

ListPropertyType is a AbstractPropertyType for arrays of AbstractPropertyTypes. More...

#include <abstractpropertytype.h>

Inheritance diagram for ListPropertyType< T >:
Inheritance graph
[legend]
Collaboration diagram for ListPropertyType< T >:
Collaboration graph
[legend]

Public Member Functions

 ListPropertyType (std::string propertyName)
 
 ListPropertyType (std::string propertyName, T value)
 
 ListPropertyType (ListPropertyType &other)
 
void append (T property)
 append - appends a property to the list More...
 
uint count ()
 
AbstractPropertyTypecopy ()
 copy More...
 
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...
 
std::string toString () const
 toString More...
 
void fromString (std::string str)
 fromString converts from string value
 
GVariant * toVariant ()
 toVariant More...
 
void fromVariant (GVariant *v)
 fromVariant converts GVariant value into compatible native value. Caller owns GVariant argument. More...
 
std::vector< T > list ()
 
- Public Member Functions inherited from AbstractPropertyType
 AbstractPropertyType (std::string property)
 
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...
 
virtual const string signature ()
 signature More...
 

Additional Inherited Members

- Public Types inherited from AbstractPropertyType
enum  Priority { Normal = 0, Low, High, Instant }
 The Priority enum describes prority of the property type. More...
 
- Public Attributes inherited from AbstractPropertyType
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 inherited from AbstractPropertyType
boost::any mValue
 

Detailed Description

template<class T = AbstractPropertyType>
class ListPropertyType< T >

ListPropertyType is a AbstractPropertyType for arrays of AbstractPropertyTypes.

Examples:
/home/kev/src/automotive-message-broker/lib/abstractpropertytype.h, and /home/kev/src/automotive-message-broker/lib/vehicleproperty.h.

Member Function Documentation

template<class T = AbstractPropertyType>
void ListPropertyType< T >::append ( property)
inline

append - appends a property to the list

  • property - property to be appended.
template<class T = AbstractPropertyType>
AbstractPropertyType* ListPropertyType< T >::copy ( )
inlinevirtual

copy

Returns
a copy of the AbstractPropertyType

Implements AbstractPropertyType.

template<class T = AbstractPropertyType>
void ListPropertyType< T >::fromVariant ( GVariant *  )
inlinevirtual

fromVariant converts GVariant value into compatible native value. Caller owns GVariant argument.

TODO: fill this in

Implements AbstractPropertyType.

template<class T = AbstractPropertyType>
void ListPropertyType< T >::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

Reimplemented from AbstractPropertyType.

template<class T = AbstractPropertyType>
std::string ListPropertyType< T >::toString ( ) const
inlinevirtual

toString

Returns
strigified value

Implements AbstractPropertyType.

template<class T = AbstractPropertyType>
GVariant* ListPropertyType< T >::toVariant ( )
inlinevirtual

toVariant

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

Implements AbstractPropertyType.


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