Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::properties::PropertySetting< T, DataType > Class Template Reference
Inheritance diagram for Arcane::properties::PropertySetting< T, DataType >:
Collaboration diagram for Arcane::properties::PropertySetting< T, DataType >:

Classes

class  SetterArg
class  GetterArg

Public Types

typedef PropertySetting< T, DataType > ThatClass
typedef PropertySettingTraits< DataType > SettingsTraits
typedef SettingsTraits::InputType InputType
typedef SettingsTraits::OutputType OutputType
typedef std::function< void(SetterArg a)> SetterType
typedef std::function< OutputType(GetterArg a)> GetterType

Public Member Functions

 PropertySetting (StringView name, GetterType getter, SetterType setter)
 PropertySetting (StringView name)
IPropertySettingsetting () final
const IPropertySettingsetting () const final
String name () const final
 Property name.
String commandLineArgument () const final
 Command line argument name (null if none).
String description () const final
 Property description.
String typeName () const final
 Property type.
ThatClass & addSetter (const SetterType &setter)
ThatClass & addGetter (const GetterType &getter)
ThatClass & addCommandLineArgument (const String &arg)
ThatClass & addDescription (const String &arg)
void setInstanceValue (T &instance, InputType value) const
void setFromJSON (const JSONValue &v, T &instance) const override
void setFromString (const String &v, T &instance) const override
void print (std::ostream &o, const T &instance) const override

Private Attributes

String m_name
GetterType m_getter
SetterType m_setter
String m_command_line_argument
String m_description

Friends

PropertyVisitor< T > & operator<< (PropertyVisitor< T > &o, const ThatClass &me)

Detailed Description

template<typename T, typename DataType>
class Arcane::properties::PropertySetting< T, DataType >

Definition at line 247 of file Property.h.

Member Typedef Documentation

◆ GetterType

template<typename T, typename DataType>
typedef std::function<OutputType(GetterArg a)> Arcane::properties::PropertySetting< T, DataType >::GetterType

Definition at line 284 of file Property.h.

◆ InputType

template<typename T, typename DataType>
typedef SettingsTraits::InputType Arcane::properties::PropertySetting< T, DataType >::InputType

Definition at line 255 of file Property.h.

◆ OutputType

template<typename T, typename DataType>
typedef SettingsTraits::OutputType Arcane::properties::PropertySetting< T, DataType >::OutputType

Definition at line 256 of file Property.h.

◆ SetterType

template<typename T, typename DataType>
typedef std::function<void(SetterArg a)> Arcane::properties::PropertySetting< T, DataType >::SetterType

Definition at line 283 of file Property.h.

◆ SettingsTraits

template<typename T, typename DataType>
typedef PropertySettingTraits<DataType> Arcane::properties::PropertySetting< T, DataType >::SettingsTraits

Definition at line 254 of file Property.h.

◆ ThatClass

template<typename T, typename DataType>
typedef PropertySetting<T, DataType> Arcane::properties::PropertySetting< T, DataType >::ThatClass

Definition at line 253 of file Property.h.

Constructor & Destructor Documentation

◆ PropertySetting() [1/2]

template<typename T, typename DataType>
Arcane::properties::PropertySetting< T, DataType >::PropertySetting ( StringView name,
GetterType getter,
SetterType setter )
inline

Definition at line 288 of file Property.h.

◆ PropertySetting() [2/2]

template<typename T, typename DataType>
Arcane::properties::PropertySetting< T, DataType >::PropertySetting ( StringView name)
inline

Definition at line 293 of file Property.h.

Member Function Documentation

◆ addCommandLineArgument()

template<typename T, typename DataType>
ThatClass & Arcane::properties::PropertySetting< T, DataType >::addCommandLineArgument ( const String & arg)
inline

Definition at line 335 of file Property.h.

◆ addDescription()

template<typename T, typename DataType>
ThatClass & Arcane::properties::PropertySetting< T, DataType >::addDescription ( const String & arg)
inline

Definition at line 340 of file Property.h.

◆ addGetter()

template<typename T, typename DataType>
ThatClass & Arcane::properties::PropertySetting< T, DataType >::addGetter ( const GetterType & getter)
inline

Definition at line 330 of file Property.h.

◆ addSetter()

template<typename T, typename DataType>
ThatClass & Arcane::properties::PropertySetting< T, DataType >::addSetter ( const SetterType & setter)
inline

Definition at line 325 of file Property.h.

◆ commandLineArgument()

template<typename T, typename DataType>
String Arcane::properties::PropertySetting< T, DataType >::commandLineArgument ( ) const
inlinefinalvirtual

Command line argument name (null if none).

Implements Arcane::properties::IPropertySetting.

Definition at line 313 of file Property.h.

◆ description()

template<typename T, typename DataType>
String Arcane::properties::PropertySetting< T, DataType >::description ( ) const
inlinefinalvirtual

Property description.

Implements Arcane::properties::IPropertySetting.

Definition at line 317 of file Property.h.

◆ name()

template<typename T, typename DataType>
String Arcane::properties::PropertySetting< T, DataType >::name ( ) const
inlinefinalvirtual

Property name.

Implements Arcane::properties::IPropertySetting.

Definition at line 309 of file Property.h.

◆ print()

template<typename T, typename DataType>
void Arcane::properties::PropertySetting< T, DataType >::print ( std::ostream & o,
const T & instance ) const
inlineoverridevirtual

Implements Arcane::properties::PropertySettingBase< T >.

Definition at line 359 of file Property.h.

◆ setFromJSON()

template<typename T, typename DataType>
void Arcane::properties::PropertySetting< T, DataType >::setFromJSON ( const JSONValue & v,
T & instance ) const
inlineoverridevirtual

Implements Arcane::properties::PropertySettingBase< T >.

Definition at line 349 of file Property.h.

◆ setFromString()

template<typename T, typename DataType>
void Arcane::properties::PropertySetting< T, DataType >::setFromString ( const String & v,
T & instance ) const
inlineoverridevirtual

Implements Arcane::properties::PropertySettingBase< T >.

Definition at line 354 of file Property.h.

◆ setInstanceValue()

template<typename T, typename DataType>
void Arcane::properties::PropertySetting< T, DataType >::setInstanceValue ( T & instance,
InputType value ) const
inline

Definition at line 345 of file Property.h.

◆ setting() [1/2]

template<typename T, typename DataType>
const IPropertySetting * Arcane::properties::PropertySetting< T, DataType >::setting ( ) const
inlinefinalvirtual

Implements Arcane::properties::PropertySettingBase< T >.

Definition at line 305 of file Property.h.

◆ setting() [2/2]

template<typename T, typename DataType>
IPropertySetting * Arcane::properties::PropertySetting< T, DataType >::setting ( )
inlinefinalvirtual

Implements Arcane::properties::PropertySettingBase< T >.

Definition at line 301 of file Property.h.

◆ typeName()

template<typename T, typename DataType>
String Arcane::properties::PropertySetting< T, DataType >::typeName ( ) const
inlinefinalvirtual

Property type.

Implements Arcane::properties::IPropertySetting.

Definition at line 321 of file Property.h.

◆ operator<<

template<typename T, typename DataType>
PropertyVisitor< T > & operator<< ( PropertyVisitor< T > & o,
const ThatClass & me )
friend

Definition at line 368 of file Property.h.

Member Data Documentation

◆ m_command_line_argument

template<typename T, typename DataType>
String Arcane::properties::PropertySetting< T, DataType >::m_command_line_argument
private

Definition at line 379 of file Property.h.

◆ m_description

template<typename T, typename DataType>
String Arcane::properties::PropertySetting< T, DataType >::m_description
private

Definition at line 380 of file Property.h.

◆ m_getter

template<typename T, typename DataType>
GetterType Arcane::properties::PropertySetting< T, DataType >::m_getter
private

Definition at line 377 of file Property.h.

◆ m_name

template<typename T, typename DataType>
String Arcane::properties::PropertySetting< T, DataType >::m_name
private

Definition at line 376 of file Property.h.

◆ m_setter

template<typename T, typename DataType>
SetterType Arcane::properties::PropertySetting< T, DataType >::m_setter
private

Definition at line 378 of file Property.h.


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