IOSS 2.0

Public Member Functions | Private Attributes | List of all members
Ioss::FieldManager Class Reference

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

`#include <Ioss_FieldManager.h>`

## Public Member Functions
| FieldManager ()=default
| FieldManager (const FieldManager &)=delete
FieldManager & | operator= (const FieldManager &)=delete
| ~FieldManager ()=default
void | add (const Field &new_field)
| Add a field to the field manager. More...
void | erase (const std::string &field_name)
| Remove a field from the field manager. More...
bool | exists (const std::string &field_name) const
| Checks if a field with a given name exists in the field manager. More...
Field | get (const std::string &field_name) const
| Get a field from the field manager. More...
const Field & | getref (const std::string &field_name) const
| Get a reference to a field from the field manager. More...
int | describe (NameList *names) const
| Get the names of all fields in the field manager. More...
int | describe (Field::RoleType role, NameList *names) const
| Get the names of all fields of a specified RoleType in the field manager. More...
size_t | count () const
| Get the number of fields in the field manager. More...

## Private Attributes
FieldMapType | fields

## Detailed Description

A collection of Ioss::Field objects.

## Constructor & Destructor Documentation

## ◆ FieldManager() [1/2]

Ioss::FieldManager::FieldManager | ( |  | ) |
| default

## ◆ FieldManager() [2/2]

Ioss::FieldManager::FieldManager | ( | const FieldManager & |  | ) |
| delete

## ◆ ~FieldManager()

Ioss::FieldManager::~FieldManager | ( |  | ) |
| default

## Member Function Documentation

## ◆ add()

void Ioss::FieldManager::add | ( | const Field & | new_field | ) |

Add a field to the field manager.

Assumes that a field with the same name does not already exist.

Parameters

  [in] | new_field | The field to add

## ◆ count()

size_t Ioss::FieldManager::count | ( |  | ) | const

Get the number of fields in the field manager.

Returns
  The number of fields in the field manager.

## ◆ describe() [1/2]

int Ioss::FieldManager::describe | ( | Field::RoleType | role,
|  | NameList * | names
| ) |  | const

Get the names of all fields of a specified RoleType in the field manager.

Parameters

  [in] | role | The role type (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc.)
  [out] | names | All field names of the specified RoleType in the field manager.

Returns
  The number of fields extracted from the field manager.

## ◆ describe() [2/2]

int Ioss::FieldManager::describe | ( | NameList * | names | ) | const

Get the names of all fields in the field manager.

Parameters

  [out] | names | All field names in the field manager.

Returns
  The number of fields extracted from the field manager.

## ◆ erase()

void Ioss::FieldManager::erase | ( | const std::string & | field_name | ) |

Remove a field from the field manager.

Assumes that a field with the given name exists in the field manager.

Parameters

  [in] | field_name | The name of the field to remove.

## ◆ exists()

bool Ioss::FieldManager::exists | ( | const std::string & | field_name | ) | const

Checks if a field with a given name exists in the field manager.

Parameters

  [in] | field_name | The name of the field to check for.

Returns
  True if the field exists in the field manager.

## ◆ get()

Ioss::Field Ioss::FieldManager::get | ( | const std::string & | field_name | ) | const

Get a field from the field manager.

Parameters

  [in] | field_name | The name of the field to get.

Returns
  The field object.

## ◆ getref()

const Ioss::Field & Ioss::FieldManager::getref | ( | const std::string & | field_name | ) | const

Get a reference to a field from the field manager.

Parameters

  [in] | field_name | The name of the field to get.

Returns
  A reference to the field object.

## ◆ operator=()

FieldManager& Ioss::FieldManager::operator= | ( | const FieldManager & |  | ) |
| delete

## Member Data Documentation

## ◆ fields

FieldMapType Ioss::FieldManager::fields
| private

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

- src/Ioss_FieldManager.h
- src/Ioss_FieldManager.C