BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::input::Section Class Reference

One hierarchical section of a configuration file. More...

#include <cl_Input_Section.hpp>

Public Member Functions

 Section (const Section *aParent, const Cell< string > &aBuffer, const string &aKey, const index_t aStartFlag, const index_t aEndFlag)
 ~Section ()
const stringtype () const
 return the type of this Section
const stringlabel () const
 return the name of this Section
const stringkey () const
bool section_exists (const string &aType) const
 tell if a section exists
bool section_exists (const string &aType, const string &aLabel) const
 tell if a section exists
bool key_exists (const string &aKey) const
 check if a key exists
bool key_is_real (const string &aKey) const
 check if a key is real
const stringget_string (const string &aKey) const
 get the value of a key
bool get_bool (const string &aKey) const
 get the bool value of a key
real get_real (const string &aKey) const
 get the real value of a key
value get_value (const string &aKey, const string &aUnit) const
 get the real value of a key with unit
void get_value (const index_t aIndex, string &aKey, value &aValue) const
 get the key/value pair for a certain index
string get_units (const string &aKey) const
 get the units of a key
int get_int (const string &aKey) const
 get the int value of a key
void get_ids (const string &aKey, Vector< id_t > &aIDs) const
void get_intersection_list (const string &aKey, Vector< id_t > &aIDs1, Vector< id_t > &aIDs2) const
std::pair< id_t, id_tget_intersection_ids (const string &aKey) const
void get_ids (const string &aKey, const string &aTape, Vector< id_t > &aIDs) const
void get_id_groups (const string &aKey, Cell< Cell< id_t > > &aIDs) const
void get_reals (const string &aKey, Vector< real > &aReals) const
const Sectionsection (const string &aType) const
 return a subsection by type string (requires empty label)
const Sectionsection (const string &aType, const string &aLabel) const
 return a subsection by type and label
const Sectionsection (const index_t aIndex) const
 access a section by index
index_t num_sections () const
 number of sections
index_t num_keys () const
 number of keys
const stringkey (const index_t aIndex) const
 return the name of this key
int level () const
 the level of this section
const Sectionparent () const
 the parent of this section
string tree () const
 returns the tree of this section
index_t start () const
 start flag in buffer
index_t end () const
 end flag in buffer
void ids_from_string (const string &aString, Vector< id_t > &aIDs) const
const Cell< string > & buffer () const

Detailed Description

One hierarchical section of a configuration file.

See also
BELFEM I/O Usage Guide

Constructor & Destructor Documentation

◆ Section()

belfem::input::Section::Section ( const Section * aParent,
const Cell< string > & aBuffer,
const string & aKey,
const index_t aStartFlag,
const index_t aEndFlag )

◆ ~Section()

belfem::input::Section::~Section ( )

Member Function Documentation

◆ buffer()

const Cell< string > & belfem::input::Section::buffer ( ) const
inline

◆ end()

index_t belfem::input::Section::end ( ) const
inline

end flag in buffer

◆ get_bool()

bool belfem::input::Section::get_bool ( const string & aKey) const

get the bool value of a key

◆ get_id_groups()

void belfem::input::Section::get_id_groups ( const string & aKey,
Cell< Cell< id_t > > & aIDs ) const

◆ get_ids() [1/2]

void belfem::input::Section::get_ids ( const string & aKey,
const string & aTape,
Vector< id_t > & aIDs ) const

◆ get_ids() [2/2]

void belfem::input::Section::get_ids ( const string & aKey,
Vector< id_t > & aIDs ) const

◆ get_int()

int belfem::input::Section::get_int ( const string & aKey) const

get the int value of a key

◆ get_intersection_ids()

std::pair< id_t, id_t > belfem::input::Section::get_intersection_ids ( const string & aKey) const

◆ get_intersection_list()

void belfem::input::Section::get_intersection_list ( const string & aKey,
Vector< id_t > & aIDs1,
Vector< id_t > & aIDs2 ) const

◆ get_real()

real belfem::input::Section::get_real ( const string & aKey) const

get the real value of a key

◆ get_reals()

void belfem::input::Section::get_reals ( const string & aKey,
Vector< real > & aReals ) const

◆ get_string()

const string & belfem::input::Section::get_string ( const string & aKey) const

get the value of a key

◆ get_units()

string belfem::input::Section::get_units ( const string & aKey) const

get the units of a key

◆ get_value() [1/2]

void belfem::input::Section::get_value ( const index_t aIndex,
string & aKey,
value & aValue ) const

get the key/value pair for a certain index

◆ get_value() [2/2]

value belfem::input::Section::get_value ( const string & aKey,
const string & aUnit ) const

get the real value of a key with unit

◆ ids_from_string()

void belfem::input::Section::ids_from_string ( const string & aString,
Vector< id_t > & aIDs ) const

◆ key() [1/2]

const string & belfem::input::Section::key ( ) const

◆ key() [2/2]

const string & belfem::input::Section::key ( const index_t aIndex) const
inline

return the name of this key

◆ key_exists()

bool belfem::input::Section::key_exists ( const string & aKey) const

check if a key exists

◆ key_is_real()

bool belfem::input::Section::key_is_real ( const string & aKey) const

check if a key is real

◆ label()

const string & belfem::input::Section::label ( ) const

return the name of this Section

◆ level()

int belfem::input::Section::level ( ) const

the level of this section

◆ num_keys()

index_t belfem::input::Section::num_keys ( ) const
inline

number of keys

◆ num_sections()

index_t belfem::input::Section::num_sections ( ) const
inline

number of sections

◆ parent()

const Section * belfem::input::Section::parent ( ) const

the parent of this section

◆ section() [1/3]

const Section * belfem::input::Section::section ( const index_t aIndex) const
inline

access a section by index

◆ section() [2/3]

const Section * belfem::input::Section::section ( const string & aType) const

return a subsection by type string (requires empty label)

◆ section() [3/3]

const Section * belfem::input::Section::section ( const string & aType,
const string & aLabel ) const

return a subsection by type and label

◆ section_exists() [1/2]

bool belfem::input::Section::section_exists ( const string & aType) const
inline

tell if a section exists

◆ section_exists() [2/2]

bool belfem::input::Section::section_exists ( const string & aType,
const string & aLabel ) const
inline

tell if a section exists

◆ start()

index_t belfem::input::Section::start ( ) const
inline

start flag in buffer

◆ tree()

string belfem::input::Section::tree ( ) const

returns the tree of this section

◆ type()

const string & belfem::input::Section::type ( ) const

return the type of this Section


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