IOSS 2.0
Loading...
Searching...
No Matches
Ioss::PropertyManager Class Reference

A collection of Ioss::Property objects. More...

#include <Ioss_PropertyManager.h>

Collaboration diagram for Ioss::PropertyManager:
[legend]

Public Member Functions

 PropertyManager ()=default
 
 PropertyManager (const PropertyManager &from)
 
PropertyManageroperator= (const PropertyManager &from)=delete
 
void add (const Property &new_prop)
 Add a property to the property manager.
 
void erase (const std::string &property_name)
 Remove a property from the property manager.
 
IOSS_NODISCARD bool exists (const std::string &property_name) const
 Checks if a property exists in the database.
 
IOSS_NODISCARD Property get (const std::string &property_name) const
 Get a property object from the property manager.
 
IOSS_NODISCARD double get_optional (const std::string &property_name, double optional_value) const
 
IOSS_NODISCARD int64_t get_optional (const std::string &property_name, int64_t optional_value) const
 
IOSS_NODISCARD int get_optional (const std::string &property_name, int optional_value) const
 Get an optional property object from the property manager.
 
IOSS_NODISCARD std::string get_optional (const std::string &property_name, const std::string &optional_value) const
 
int describe (NameList *names) const
 Get the names of all properties in the property manager.
 
IOSS_NODISCARD NameList describe () const
 Get the names of all properties in the property manager.
 
int describe (Ioss::Property::Origin origin, NameList *names) const
 Get the names of all properties in the property manager that have the origin origin
 
IOSS_NODISCARD NameList describe (Ioss::Property::Origin origin) const
 Get the names of all properties in the property manager that have the origin origin
 
IOSS_NODISCARD size_t count () const
 

Private Attributes

PropMapType m_properties {}
 

Detailed Description

A collection of Ioss::Property objects.

Constructor & Destructor Documentation

◆ PropertyManager() [1/2]

Ioss::PropertyManager::PropertyManager ( )
default

◆ PropertyManager() [2/2]

Ioss::PropertyManager::PropertyManager ( const PropertyManager & from)
inline

Member Function Documentation

◆ add()

void Ioss::PropertyManager::add ( const Property & new_prop)

Add a property to the property manager.

Parameters
[in]new_propThe property to add.

◆ count()

size_t Ioss::PropertyManager::count ( ) const

Get the number of properties in the property manager

Returns
The number of properties in the property manager.

◆ describe() [1/4]

Ioss::NameList Ioss::PropertyManager::describe ( ) const

Get the names of all properties in the property manager.

Returns
All the property names in the property manager.

◆ describe() [2/4]

Ioss::NameList Ioss::PropertyManager::describe ( Ioss::Property::Origin origin) const

Get the names of all properties in the property manager that have the origin origin

Parameters
[in]originThe origin of the property: IMPLICIT, EXTERNAL, ATTRIBUTE
Returns
The number of properties extracted from the property manager.

◆ describe() [3/4]

int Ioss::PropertyManager::describe ( Ioss::Property::Origin origin,
NameList * names ) const

Get the names of all properties in the property manager that have the origin origin

Parameters
[in]originThe origin of the property: IMPLICIT, EXTERNAL, ATTRIBUTE
[out]namesAll the property names in the property manager.
Returns
The number of properties extracted from the property manager.

◆ describe() [4/4]

int Ioss::PropertyManager::describe ( NameList * names) const

Get the names of all properties in the property manager.

Parameters
[out]namesAll the property names in the property manager.
Returns
The number of properties extracted from the property manager.

◆ erase()

void Ioss::PropertyManager::erase ( const std::string & property_name)

Remove a property from the property manager.

Assumes that the property with the given name already exists in the property manager.

Parameters
[in]property_nameThe name of the property to remove.

◆ exists()

bool Ioss::PropertyManager::exists ( const std::string & property_name) const

Checks if a property exists in the database.

Parameters
[in]property_nameThe property to check
Returns
True if the property exists, false otherwise.

◆ get()

Ioss::Property Ioss::PropertyManager::get ( const std::string & property_name) const

Get a property object from the property manager.

Parameters
[in]property_nameThe name of the property to get.
Returns
The property object.

◆ get_optional() [1/4]

std::string Ioss::PropertyManager::get_optional ( const std::string & property_name,
const std::string & optional_value ) const

◆ get_optional() [2/4]

double Ioss::PropertyManager::get_optional ( const std::string & property_name,
double optional_value ) const

◆ get_optional() [3/4]

int Ioss::PropertyManager::get_optional ( const std::string & property_name,
int optional_value ) const

Get an optional property object from the property manager.

Parameters
[in]property_nameThe name of the property to get.
[in]optional_valueThe value to return if the property does not exist.
Returns
The property object.

◆ get_optional() [4/4]

int64_t Ioss::PropertyManager::get_optional ( const std::string & property_name,
int64_t optional_value ) const

◆ operator=()

PropertyManager & Ioss::PropertyManager::operator= ( const PropertyManager & from)
delete

Member Data Documentation

◆ m_properties

PropMapType Ioss::PropertyManager::m_properties {}
private

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