eproperty::Range< TYPE > Class Template Reference

#include <Range.hpp>

Inheritance diagram for eproperty::Range< TYPE >:
eproperty::Value< TYPE > eproperty::PropertyType< TYPE > eproperty::Property

Public Member Functions

template<class CLASS_TYPE >
 Range (CLASS_TYPE *_owner, const std::string &_name, const TYPE &_defaultValue, const TYPE &_min, const TYPE &_max, const std::string &_description="", void(CLASS_TYPE::*_setObs)()=nullptr)
 
 Range (const TYPE &_defaultValue, const TYPE &_min, const TYPE &_max)
 
virtual ~Range ()=default
 
std::string getPropertyType () const override
 
void setString (const std::string &_newVal) override
 
std::string getInfo () const override
 
void set (const TYPE &_newVal) override
 
void setDirectCheck (const TYPE &_newVal) override
 
- Public Member Functions inherited from eproperty::Value< TYPE >
template<class CLASS_TYPE >
 Value (CLASS_TYPE *_owner, const std::string &_name, const TYPE &_defaultValue, const std::string &_description="", void(CLASS_TYPE::*_setObs)()=nullptr)
 
 Value (const TYPE &_defaultValue)
 
std::string getValueSpecific (const TYPE &_valueRequested) const override
 
void setString (const std::string &_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 getType () const override
 
std::string getString () const override
 
std::string getDefault () 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
 
virtual std::vector< std::string > getListValue () 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::Range< TYPE >

Range template of the property (limit with a min and a max value)

Template Parameters
TYPETpe of the range value

Constructor & Destructor Documentation

§ Range() [1/2]

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

Create a parameter with a specific type.

Parameters
[in]_ownerreference on the parameter lister (nullptr if none).
[in]_nameStatic name of the parameter.
[in]_defaultValueDefault value of the parameter.
[in]_minMinumum value.
[in]_maxMaximum value.
[in]_descriptiondescription of the parameter.
[in]_setObsfunction of the class that opserve the change of the value

§ Range() [2/2]

template<class TYPE>
eproperty::Range< TYPE >::Range ( const TYPE &  _defaultValue,
const TYPE &  _min,
const TYPE &  _max 
)

Create a parameter with a specific type.

Parameters
[in]_defaultValueDefault value of the parameter.
[in]_minMinumum value.
[in]_maxMaximum value.

§ ~Range()

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

Destructor.

Member Function Documentation

§ getInfo()

template<class TYPE>
std::string eproperty::Range< TYPE >::getInfo ( ) const
overridevirtual

Description of the Propertys.

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

Reimplemented from eproperty::PropertyType< TYPE >.

§ getPropertyType()

template<class TYPE>
std::string eproperty::Range< TYPE >::getPropertyType ( ) const
overridevirtual

Get the Property type of the class in string mode.

Returns
The string type of the Property.

Reimplemented from eproperty::PropertyType< TYPE >.

§ set()

template<class TYPE>
void eproperty::Range< TYPE >::set ( const TYPE &  _newVal)
overridevirtual

Set a new value for this parameter.

Parameters
[in]_newValNew value to set (set the nearest value if range is set)

Reimplemented from eproperty::PropertyType< TYPE >.

§ setDirectCheck()

template<class TYPE>
void eproperty::Range< TYPE >::setDirectCheck ( const TYPE &  _newVal)
overridevirtual

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::Range< TYPE >::setString ( const std::string &  _newVal)
overridevirtual

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/Range.hpp