Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Properties Class Reference

List of properties. More...

#include <arcane/core/Properties.h>

Collaboration diagram for Arcane::Properties:

Public Member Functions

 Properties (IPropertyMng *pm, const String &name)
 Creates or retrieves a list of properties with name name.
 Properties (const Properties &parent_property, const String &name)
 Creates or retrieves a list of properties with name name and child of parent_property.
 Properties (const Properties &rhs)
 Copy constructor.
const Propertiesoperator= (const Properties &rhs)
 Copy assignment operator.
virtual ~Properties ()
 Destroys the reference to this property.
void setBool (const String &name, bool value)
 Sets a boolean property of name name and value value.
void set (const String &name, bool value)
 Sets a boolean property of name name and value value.
bool getBool (const String &name) const
 Value of the property named name.
bool getBoolWithDefault (const String &name, bool default_value) const
 Value of the property named name.
bool get (const String &name, bool &value) const
 Value of the property named name.
void setInt32 (const String &name, Int32 value)
 Sets an Int32 property of name name and value value.
void set (const String &name, Int32 value)
 Sets an Int32 property of name name and value value.
Int32 getInt32 (const String &name) const
 Value of the property named name.
Int32 getInt32WithDefault (const String &name, Int32 default_value) const
 Value of the property named name.
bool get (const String &name, Int32 &value) const
 Value of the property named name.
void setInt64 (const String &name, Int64 value)
 Sets an Int64 property of name name and value value.
void set (const String &name, Int64 value)
 Sets an Int64 property of name name and value value.
Int64 getInt64 (const String &name) const
 Value of the property named name.
Int64 getInt64WithDefault (const String &name, Int64 default_value) const
 Value of the property named name.
bool get (const String &name, Int64 &value) const
 Value of the property named name.
void setInteger (const String &name, Integer value)
 Sets an Integer property of name name and value value.
Integer getInteger (const String &name) const
 Value of the property named name.
Integer getIntegerWithDefault (const String &name, Integer default_value) const
 Value of the property named name.
void setReal (const String &name, Real value)
 Sets a Real property of name name and value value.
void set (const String &name, Real value)
 Sets a Real property of name name and value value.
Real getReal (const String &name) const
 Value of the property named name.
Real getRealWithDefault (const String &name, Real default_value) const
 Value of the property named name.
bool get (const String &name, Real &value) const
 Value of the property named name.
void setString (const String &name, const String &value)
 Sets a String property of name name and value value.
void set (const String &name, const String &value)
 Sets a String property of name name and value value.
String getString (const String &name) const
 Value of the property named name.
String getStringWithDefault (const String &name, const String &default_value) const
 Value of the property named name.
bool get (const String &name, String &value) const
 Value of the property named name.
void set (const String &name, BoolConstArrayView value)
 Sets a BoolUniqueArray property of name name and value value.
void get (const String &name, BoolArray &value) const
 Value of the property named name.
void set (const String &name, Int32ConstArrayView value)
 Sets an Int32UniqueArray property of name name and value value.
void get (const String &name, Int32Array &value) const
 Value of the property named name.
void set (const String &name, Int64ConstArrayView value)
 Sets an Int64UniqueArray property of name name and value value.
void get (const String &name, Int64Array &value) const
 Value of the property named name.
void set (const String &name, RealConstArrayView value)
 Sets a RealUniqueArray property of name name and value value.
void get (const String &name, RealArray &value) const
 Value of the property named name.
void set (const String &name, StringConstArrayView value)
 Sets a StringUniqueArray property of name name and value value.
void get (const String &name, StringArray &value) const
 Value of the property named name.
void print (std::ostream &o) const
 Prints the properties and their values to the stream o.
void serialize (ISerializer *serializer)
 Performs the serialization of the properties.
const Stringname () const
 Name of the property.
const StringfullName () const
 Full name of the property.
IPropertyMngpropertyMng () const
void destroy ()
 Destroys the associated values of properties linked to this reference.
PropertiesImplimpl () const
PropertiesImplBasebaseImpl () const

Private Member Functions

 Properties (PropertiesImpl *p)

Private Attributes

PropertiesImplm_p
AutoRefT< PropertiesImplBasem_ref

Detailed Description

List of properties.

This class manages a list of properties. A property is characterized by a name and a value of a given type. The name must not contain the character '.' which serves as a delimiter for property hierarchies.

The set*() functions allow positioning a property. The get*() functions allow retrieving the value.

For scalar properties, there are three ways to retrieve a value. These three methods are equivalent unless the property has not been set.

  • via an overload of the get() method. If the property has not been set, the passed argument value is unchanged and the method returns false.
  • via an explicit call (e.g., getBool()). If the property has not been set, the value obtained with the default constructor for the relevant type is used.
  • via an explicit call with a possible default value (e.g., getBoolWithDefault()). If the property has not been set, the default value passed as an argument is used.

Definition at line 64 of file Properties.h.

Constructor & Destructor Documentation

◆ Properties() [1/4]

Arcane::Properties::Properties ( IPropertyMng * pm,
const String & name )

Creates or retrieves a list of properties with name name.

Definition at line 760 of file Properties.cc.

References Arcane::IPropertyMng::getPropertiesImpl(), and Arcane::IPropertyMng::registerProperties().

Referenced by operator=(), Properties(), and Properties().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Properties() [2/4]

Arcane::Properties::Properties ( const Properties & parent_property,
const String & name )

Creates or retrieves a list of properties with name name and child of parent_property.

Definition at line 780 of file Properties.cc.

References fullName(), Arcane::IPropertyMng::getPropertiesImpl(), Properties(), and Arcane::IPropertyMng::registerProperties().

Here is the call graph for this function:

◆ Properties() [3/4]

Arcane::Properties::Properties ( const Properties & rhs)

Copy constructor.

Definition at line 819 of file Properties.cc.

References Properties().

Here is the call graph for this function:

◆ ~Properties()

Arcane::Properties::~Properties ( )
virtual

Destroys the reference to this property.

Definition at line 811 of file Properties.cc.

◆ Properties() [4/4]

Arcane::Properties::Properties ( PropertiesImpl * p)
private

Definition at line 801 of file Properties.cc.

Member Function Documentation

◆ baseImpl()

PropertiesImplBase * Arcane::Properties::baseImpl ( ) const
inline

Definition at line 222 of file Properties.h.

◆ destroy()

void Arcane::Properties::destroy ( )

Destroys the associated values of properties linked to this reference.

Definition at line 1134 of file Properties.cc.

References Arcane::IPropertyMng::destroyProperties().

Here is the call graph for this function:

◆ fullName()

const String & Arcane::Properties::fullName ( ) const

Full name of the property.

Definition at line 1116 of file Properties.cc.

Referenced by Arcane::PropertyMng::destroyProperties(), Arcane::PropertyMng::print(), Properties(), and Arcane::PropertyMng::registerProperties().

Here is the caller graph for this function:

◆ get() [1/10]

bool Arcane::Properties::get ( const String & name,
bool & value ) const

Value of the property named name.

Definition at line 864 of file Properties.cc.

Referenced by getBoolWithDefault(), and Arcane::Parallel::Stat::mergeValues().

Here is the caller graph for this function:

◆ get() [2/10]

void Arcane::Properties::get ( const String & name,
BoolArray & value ) const

Value of the property named name.

Definition at line 1024 of file Properties.cc.

◆ get() [3/10]

bool Arcane::Properties::get ( const String & name,
Int32 & value ) const

Value of the property named name.

Definition at line 895 of file Properties.cc.

References name().

Here is the call graph for this function:

◆ get() [4/10]

void Arcane::Properties::get ( const String & name,
Int32Array & value ) const

Value of the property named name.

Definition at line 1038 of file Properties.cc.

◆ get() [5/10]

bool Arcane::Properties::get ( const String & name,
Int64 & value ) const

Value of the property named name.

Definition at line 927 of file Properties.cc.

◆ get() [6/10]

void Arcane::Properties::get ( const String & name,
Int64Array & value ) const

Value of the property named name.

Definition at line 1052 of file Properties.cc.

◆ get() [7/10]

bool Arcane::Properties::get ( const String & name,
Real & value ) const

Value of the property named name.

Definition at line 979 of file Properties.cc.

◆ get() [8/10]

void Arcane::Properties::get ( const String & name,
RealArray & value ) const

Value of the property named name.

Definition at line 1066 of file Properties.cc.

◆ get() [9/10]

bool Arcane::Properties::get ( const String & name,
String & value ) const

Value of the property named name.

Definition at line 1010 of file Properties.cc.

◆ get() [10/10]

void Arcane::Properties::get ( const String & name,
StringArray & value ) const

Value of the property named name.

Definition at line 1080 of file Properties.cc.

◆ getBool()

bool Arcane::Properties::getBool ( const String & name) const

Value of the property named name.

Definition at line 859 of file Properties.cc.

References getBoolWithDefault().

Here is the call graph for this function:

◆ getBoolWithDefault()

bool Arcane::Properties::getBoolWithDefault ( const String & name,
bool default_value ) const

Value of the property named name.

Definition at line 852 of file Properties.cc.

References get().

Referenced by getBool().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInt32()

Int32 Arcane::Properties::getInt32 ( const String & name) const

Value of the property named name.

Definition at line 890 of file Properties.cc.

References getInt32WithDefault(), and name().

Here is the call graph for this function:

◆ getInt32WithDefault()

Int32 Arcane::Properties::getInt32WithDefault ( const String & name,
Int32 default_value ) const

Value of the property named name.

Definition at line 883 of file Properties.cc.

References name().

Referenced by getInt32(), and Arcane::Parallel::Stat::mergeValues().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInt64()

Int64 Arcane::Properties::getInt64 ( const String & name) const

Value of the property named name.

Definition at line 922 of file Properties.cc.

References getInt64WithDefault().

Here is the call graph for this function:

◆ getInt64WithDefault()

Int64 Arcane::Properties::getInt64WithDefault ( const String & name,
Int64 default_value ) const

Value of the property named name.

Definition at line 915 of file Properties.cc.

Referenced by getInt64().

Here is the caller graph for this function:

◆ getInteger()

Integer Arcane::Properties::getInteger ( const String & name) const

Value of the property named name.

Definition at line 948 of file Properties.cc.

References getIntegerWithDefault(), and name().

Here is the call graph for this function:

◆ getIntegerWithDefault()

Integer Arcane::Properties::getIntegerWithDefault ( const String & name,
Integer default_value ) const

Value of the property named name.

Definition at line 941 of file Properties.cc.

Referenced by getInteger().

Here is the caller graph for this function:

◆ getReal()

Real Arcane::Properties::getReal ( const String & name) const

Value of the property named name.

Definition at line 974 of file Properties.cc.

References getRealWithDefault().

Here is the call graph for this function:

◆ getRealWithDefault()

Real Arcane::Properties::getRealWithDefault ( const String & name,
Real default_value ) const

Value of the property named name.

Definition at line 967 of file Properties.cc.

Referenced by getReal().

Here is the caller graph for this function:

◆ getString()

String Arcane::Properties::getString ( const String & name) const

Value of the property named name.

Definition at line 1005 of file Properties.cc.

References getStringWithDefault().

Here is the call graph for this function:

◆ getStringWithDefault()

String Arcane::Properties::getStringWithDefault ( const String & name,
const String & default_value ) const

Value of the property named name.

Definition at line 998 of file Properties.cc.

Referenced by getString().

Here is the caller graph for this function:

◆ impl()

PropertiesImpl * Arcane::Properties::impl ( ) const
inline

Definition at line 219 of file Properties.h.

◆ name()

const String & Arcane::Properties::name ( ) const

Name of the property.

Definition at line 1107 of file Properties.cc.

Referenced by get(), getInt32(), getInt32WithDefault(), and getInteger().

Here is the caller graph for this function:

◆ operator=()

const Properties & Arcane::Properties::operator= ( const Properties & rhs)

Copy assignment operator.

Definition at line 829 of file Properties.cc.

References Properties().

Here is the call graph for this function:

◆ print()

void Arcane::Properties::print ( std::ostream & o) const

Prints the properties and their values to the stream o.

Definition at line 1089 of file Properties.cc.

Referenced by Arcane::PropertyMng::print().

Here is the caller graph for this function:

◆ propertyMng()

IPropertyMng * Arcane::Properties::propertyMng ( ) const

Definition at line 1125 of file Properties.cc.

◆ serialize()

void Arcane::Properties::serialize ( ISerializer * serializer)

Performs the serialization of the properties.

Definition at line 1098 of file Properties.cc.

Referenced by Arcane::PropertyMng::serialize().

Here is the caller graph for this function:

◆ set() [1/10]

void Arcane::Properties::set ( const String & name,
bool value )

Sets a boolean property of name name and value value.

Definition at line 847 of file Properties.cc.

References setBool().

Referenced by Arcane::Parallel::Stat::saveValues(), and setInteger().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set() [2/10]

void Arcane::Properties::set ( const String & name,
BoolConstArrayView value )

Sets a BoolUniqueArray property of name name and value value.

Definition at line 1019 of file Properties.cc.

◆ set() [3/10]

void Arcane::Properties::set ( const String & name,
const String & value )

Sets a String property of name name and value value.

Definition at line 993 of file Properties.cc.

References setString().

Here is the call graph for this function:

◆ set() [4/10]

void Arcane::Properties::set ( const String & name,
Int32 value )

Sets an Int32 property of name name and value value.

Definition at line 878 of file Properties.cc.

References setInt32().

Here is the call graph for this function:

◆ set() [5/10]

void Arcane::Properties::set ( const String & name,
Int32ConstArrayView value )

Sets an Int32UniqueArray property of name name and value value.

Definition at line 1033 of file Properties.cc.

◆ set() [6/10]

void Arcane::Properties::set ( const String & name,
Int64 value )

Sets an Int64 property of name name and value value.

Definition at line 910 of file Properties.cc.

References setInt64().

Here is the call graph for this function:

◆ set() [7/10]

void Arcane::Properties::set ( const String & name,
Int64ConstArrayView value )

Sets an Int64UniqueArray property of name name and value value.

Definition at line 1047 of file Properties.cc.

◆ set() [8/10]

void Arcane::Properties::set ( const String & name,
Real value )

Sets a Real property of name name and value value.

Definition at line 962 of file Properties.cc.

References setReal().

Here is the call graph for this function:

◆ set() [9/10]

void Arcane::Properties::set ( const String & name,
RealConstArrayView value )

Sets a RealUniqueArray property of name name and value value.

Definition at line 1061 of file Properties.cc.

◆ set() [10/10]

void Arcane::Properties::set ( const String & name,
StringConstArrayView value )

Sets a StringUniqueArray property of name name and value value.

Definition at line 1075 of file Properties.cc.

◆ setBool()

void Arcane::Properties::setBool ( const String & name,
bool value )

Sets a boolean property of name name and value value.

Definition at line 842 of file Properties.cc.

Referenced by set().

Here is the caller graph for this function:

◆ setInt32()

void Arcane::Properties::setInt32 ( const String & name,
Int32 value )

Sets an Int32 property of name name and value value.

Definition at line 873 of file Properties.cc.

Referenced by set().

Here is the caller graph for this function:

◆ setInt64()

void Arcane::Properties::setInt64 ( const String & name,
Int64 value )

Sets an Int64 property of name name and value value.

Definition at line 905 of file Properties.cc.

Referenced by set().

Here is the caller graph for this function:

◆ setInteger()

void Arcane::Properties::setInteger ( const String & name,
Integer value )

Sets an Integer property of name name and value value.

Definition at line 936 of file Properties.cc.

References set().

Here is the call graph for this function:

◆ setReal()

void Arcane::Properties::setReal ( const String & name,
Real value )

Sets a Real property of name name and value value.

Definition at line 957 of file Properties.cc.

Referenced by set().

Here is the caller graph for this function:

◆ setString()

void Arcane::Properties::setString ( const String & name,
const String & value )

Sets a String property of name name and value value.

Definition at line 988 of file Properties.cc.

Referenced by set().

Here is the caller graph for this function:

Member Data Documentation

◆ m_p

PropertiesImpl* Arcane::Properties::m_p
private

Definition at line 226 of file Properties.h.

◆ m_ref

AutoRefT<PropertiesImplBase> Arcane::Properties::m_ref
private

Definition at line 227 of file Properties.h.


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