eproperty::List< TYPE > Class Template Reference

#include <List.hpp>

Inheritance diagram for eproperty::List< TYPE >:
eproperty::PropertyType< TYPE > eproperty::Property

Public Member Functions

template<class CLASS_TYPE >
 List (CLASS_TYPE *_owner, const std::string &_name, const TYPE &_defaultValue, const std::string &_description="", void(CLASS_TYPE::*_setObs)()=nullptr)
 
 List (const TYPE &_defaultValue)
 
virtual ~List ()=default
 
void add (const TYPE &_value, const std::string &_name, const std::string &_description="")
 
void remove (const std::string &_name)
 
void rename (const std::string &_nameOld, const std::string &_nameNew)
 
std::string getPropertyType () const override
 
void setString (const std::string &_newVal) override
 
std::string getInfo () const override
 
std::vector< std::string > getListValue () const override
 
void set (const TYPE &_newVal) override
 
void setDirectCheck (const TYPE &_newVal) override
 
- Public Member Functions inherited from eproperty::PropertyType< TYPE >
template<class CLASS_TYPE >
 PropertyType (CLASS_TYPE *_owner, const std::string &_name, const TYPE &_defaultValue, const std::string &_description="", void(CLASS_TYPE::*_setObs)()=nullptr)
 
 PropertyType (const TYPE &_defaultValue)
 
virtual ~PropertyType ()=default
 
std::string getPropertyType () const override
 
std::string getType () const override
 
std::string getString () const override
 
std::string getDefault () const override
 
std::string getInfo () const override
 
bool isDefault () const override
 
void setDefault () override
 
virtual void changeDefault (const TYPE &_newDefault)
 
const TYPE & get () const
 
void setDirect (const TYPE &_newVal)
 
TYPE & getDirect ()
 
 operator const TYPE & () const
 
const TYPE & operator* () const noexcept
 
const TYPE * operator-> () const noexcept
 
PropertyType< TYPE > & operator= (const TYPE &_newVal)=delete
 
- Public Member Functions inherited from eproperty::Property
 Property (eproperty::Interface *_paramInterfaceLink, const std::string &_name)
 
 Property ()
 
virtual ~Property ()=default
 
void notifyChange () const
 
virtual std::string getName () const
 
template<class TYPE >
bool operator== (const TYPE &_obj) const =delete
 
template<class TYPE >
bool operator!= (const TYPE &_obj) const =delete
 
template<class TYPE >
bool operator<= (const TYPE &_obj) const =delete
 
template<class TYPE >
bool operator>= (const TYPE &_obj) const =delete
 
template<class TYPE >
bool operator< (const TYPE &_obj) const =delete
 
template<class TYPE >
bool operator> (const TYPE &_obj) const =delete
 

Additional Inherited Members

- Public Types inherited from eproperty::Property
using Observer = std::function< void()>
 
- Protected Member Functions inherited from eproperty::Property
void setObserver (eproperty::Property::Observer _setObs)
 
- Protected Attributes inherited from eproperty::PropertyType< TYPE >
TYPE m_value
 
TYPE m_default
 

Detailed Description

template<class TYPE>
class eproperty::List< TYPE >

Set a list of value availlable (for enumeration)

Constructor & Destructor Documentation

§ List() [1/2]

template<class TYPE>
template<class CLASS_TYPE >
eproperty::List< TYPE >::List ( CLASS_TYPE *  _owner,
const std::string &  _name,
const TYPE &  _defaultValue,
const std::string &  _description = "",
void(CLASS_TYPE::*)()  _setObs = nullptr 
)
inline

Create a parameter with List of element parameter (nullptr if none).

Parameters
[in]_ownerreference on the parameter lister.
[in]_nameStatic name of the parameter.
[in]_defaultValueDefault value of the parameter.
[in]_descriptiondescription of the parameter.
[in]_setObsfunction of the class that opserve the change of the value

§ List() [2/2]

template<class TYPE>
eproperty::List< TYPE >::List ( const TYPE &  _defaultValue)
inline

Create a parameter with List of element parameter (nullptr if none).

Parameters
[in]_defaultValueDefault value of the parameter.

§ ~List()

template<class TYPE>
virtual eproperty::List< TYPE >::~List ( )
virtualdefault

virtualisation of Destructor.

Member Function Documentation

§ add()

template<class TYPE>
void eproperty::List< TYPE >::add ( const TYPE &  _value,
const std::string &  _name,
const std::string &  _description = "" 
)
inline

Add a value in the list of parameter.

Parameters
[in]_valueValue of the string
[in]_nameString of the value
[in]_descriptionDescription of the parameter value

§ getInfo()

template<class TYPE>
std::string eproperty::List< TYPE >::getInfo ( ) const
inlineoverridevirtual

Description of the Propertys.

Returns
Descriptive information of the Property (for remote UI).

Implements eproperty::Property.

§ getListValue()

template<class TYPE>
std::vector<std::string> eproperty::List< TYPE >::getListValue ( ) const
inlineoverridevirtual

Specific for eproperty::List to get all the possible values.

Returns
Descriptive information of the Property (for remote UI).

Reimplemented from eproperty::Property.

§ getPropertyType()

template<class TYPE>
std::string eproperty::List< TYPE >::getPropertyType ( ) const
inlineoverridevirtual

Get the Property type of the class in string mode.

Returns
The string type of the Property.

Implements eproperty::Property.

§ remove()

template<class TYPE>
void eproperty::List< TYPE >::remove ( const std::string &  _name)
inline

Remove a value of the element availlable.

Parameters
[in]_nameName of the value to remove

§ rename()

template<class TYPE>
void eproperty::List< TYPE >::rename ( const std::string &  _nameOld,
const std::string &  _nameNew 
)
inline

Rename a value of the property.

Parameters
[in]_nameOldOld property name to replace
[in]_nameNewNew name of the property

§ set()

template<class TYPE>
void eproperty::List< TYPE >::set ( const TYPE &  _newVal)
inlineoverridevirtual

Set the value of the current parameter.

Parameters
[in]_newValNew value of the parameter. (not set if out of range)

Reimplemented from eproperty::PropertyType< TYPE >.

§ setDirectCheck()

template<class TYPE>
void eproperty::List< TYPE >::setDirectCheck ( const TYPE &  _newVal)
inlineoverridevirtual

Set the value of the current parameter (check range and ... if needed).

Note
Only use by the owner of the property/
Parameters
[in]_newValNew value to set

Reimplemented from eproperty::PropertyType< TYPE >.

§ setString()

template<class TYPE>
void eproperty::List< TYPE >::setString ( const std::string &  _newVal)
inlineoverridevirtual

Set a new value of the Property (with string interface).

Parameters
[in]_newValNew value of the Propertys.

Implements eproperty::Property.


The documentation for this class was generated from the following file:
  • framework/atria-soft/eproperty/eproperty/List.hpp