lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
lintel::Property< T > Class Template Reference

#include <Property.h>

Inheritance diagram for lintel::Property< T >:
lintel::PropertyBase

Public Member Functions

 Property (const std::string &name, const std::string &instanceName, const std::string &className, const std::string &processName, T value, const std::string &description, bool runtimeChange)
 
 Property ()
 
std::string getType () const override
 
T getValue ()
 
std::string toString () override
 
void setValue (const T &value)
 
void setValueString (const std::string &value) override
 
- Public Member Functions inherited from lintel::PropertyBase
 PropertyBase ()=delete
 
virtual ~PropertyBase ()=default
 
const std::string & getName () const
 
const std::string & getInstanceName () const
 
const DataStorage & getDataStorage () const
 
void setDataStorage (const DataStorage &newDataStorage)
 
const std::string & getClassName () const
 
const std::string & getProcessName () const
 
bool isRuntimeChange () const
 
const std::string & getDescription () const
 
const std::string & getIdentifier () const
 
 operator std::string ()
 
bool operator< (const PropertyBase &rhs) const
 

Static Public Member Functions

static constexpr bool isLockFree ()
 

Friends

class PropertyService
 

Additional Inherited Members

- Protected Member Functions inherited from lintel::PropertyBase
 PropertyBase (std::string name, std::string instanceName, std::string className, std::string processName, std::string description, bool runtimeChange)
 

Detailed Description

template<class T>
class lintel::Property< T >

Typed property with thread-safe, lock-free read/write access for POD types

Constructor & Destructor Documentation

◆ Property() [1/2]

template<class T >
lintel::Property< T >::Property ( const std::string &  name,
const std::string &  instanceName,
const std::string &  className,
const std::string &  processName,
T  value,
const std::string &  description,
bool  runtimeChange 
)
inline
Parameters
nameproperty name
instanceNameinstance name
classNameclass name
processNameprocess name
valueinitial value
descriptionproperty description
runtimeChangewhether runtime changes are supported

◆ Property() [2/2]

template<class T >
lintel::Property< T >::Property ( )
inline

Member Function Documentation

◆ getType()

template<class T >
std::string lintel::Property< T >::getType ( ) const
inlineoverridevirtual
Returns
type name of the property

Implements lintel::PropertyBase.

◆ getValue()

template<class T >
T lintel::Property< T >::getValue ( )
inline
Returns
the current value (thread-safe read)

◆ isLockFree()

template<class T >
static constexpr bool lintel::Property< T >::isLockFree ( )
inlinestaticconstexpr
Returns
true if reads/writes are guaranteed lock-free

◆ setValue()

template<class T >
void lintel::Property< T >::setValue ( const T &  value)
inline

Set the value (thread-safe write)

◆ setValueString()

template<class T >
void lintel::Property< T >::setValueString ( const std::string &  value)
inlineoverridevirtual

Set the value from a string representation

Implements lintel::PropertyBase.

◆ toString()

template<class T >
std::string lintel::Property< T >::toString ( )
inlineoverridevirtual
Returns
string representation of the current value

Implements lintel::PropertyBase.

Friends And Related Symbol Documentation

◆ PropertyService

template<class T >
friend class PropertyService
friend

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