NEML2 1.4.0
Loading...
Searching...
No Matches
OptionCollection Class Reference

A data structure that holds options of multiple objects. More...

Detailed Description

A data structure that holds options of multiple objects.

The OptionCollection is a two layer map, where the first layer key is the section name, e.g. Models, Tensors, Drivers, etc., and the second layer key is the object name.

#include <OptionCollection.h>

Public Member Functions

 OptionCollection ()=default
 
 operator std::map< std::string, std::map< std::string, OptionSet > > () const
 Implicit conversion to an STL map.
 
std::map< std::string, OptionSet > & operator[] (const std::string &section)
 Get all the object options under a specific section.
 
const std::map< std::string, std::map< std::string, OptionSet > > & data () const
 Get a read-only reference to the underlying data structure.
 

Constructor & Destructor Documentation

◆ OptionCollection()

OptionCollection ( )
default

Member Function Documentation

◆ data()

const std::map< std::string, std::map< std::string, OptionSet > > & data ( ) const
inline

Get a read-only reference to the underlying data structure.

◆ operator std::map< std::string, std::map< std::string, OptionSet > >()

operator std::map< std::string, std::map< std::string, OptionSet > > ( ) const
inline

Implicit conversion to an STL map.

◆ operator[]()

std::map< std::string, OptionSet > & operator[] ( const std::string & section)

Get all the object options under a specific section.