NEML2 2.0.0
Loading...
Searching...
No Matches
InputFile Class Reference

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

Detailed Description

A data structure that holds options of multiple objects.

#include <InputFile.h>

Public Member Functions

 InputFile (const OptionSet &settings)
 
const std::shared_ptr< Settings > & settings () const
 Get global settings.
 
std::map< std::string, OptionSet > & operator[] (const std::string &section)
 Get all the object options under a specific section.
 
const std::map< std::string, OptionSet > & operator[] (const std::string &section) const
 Get all the object options under a specific section.
 
const std::map< std::string, std::map< std::string, OptionSet > > & data () const
 

Constructor & Destructor Documentation

◆ InputFile()

InputFile ( const OptionSet & settings)

Member Function Documentation

◆ data()

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

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.

◆ operator[]() [1/2]

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

Get all the object options under a specific section.

◆ operator[]() [2/2]

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

Get all the object options under a specific section.

◆ settings()

const std::shared_ptr< Settings > & settings ( ) const
inline

Get global settings.