Arcane  4.2.3.0
User documentation
Loading...
Searching...
No Matches
Arcane::Properties Class Reference

List of properties. More...

#include <arcane/core/Properties.h>

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 Properties & operator= (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 String & name () const
 Name of the property.
const String & fullName () const
 Full name of the property.
IPropertyMng * propertyMng () const
void destroy ()
 Destroys the associated values of properties linked to this reference.
PropertiesImpl * impl () const
PropertiesImplBase * baseImpl () const

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/3]

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.

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

◆ Properties() [2/3]

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(), and Properties().

◆ Properties() [3/3]

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

Copy constructor.

Definition at line 819 of file Properties.cc.

References Properties().

◆ ~Properties()

Arcane::Properties::~Properties ( )
virtual

Destroys the reference to this property.

Definition at line 811 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().

◆ fullName()

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

Full name of the property.

Definition at line 1116 of file Properties.cc.

Referenced by Properties().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ operator=()

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

Copy assignment operator.

Definition at line 829 of file Properties.cc.

References Properties().

◆ 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.

◆ 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.

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().

◆ 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().


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