MoCSI API Reference
Loading...
Searching...
No Matches
Public Member Functions | List of all members
IniParserSnapshot Class Reference

This class parses ini files from a snapshot file. Currently supported are only the following data types: string/char, int, double, bool. While it does have a fair bit of duplicate code from IniParser, it carries a different datatype and needs other handling, thus making it incompatible. More...

#include <IniParser.h>

Collaboration diagram for IniParserSnapshot:
Collaboration graph

Public Member Functions

 IniParserSnapshot (const std::string &filename)
 Constructor for the IniParserSnapshot class. Parses all ini data in a MoCSI snapshot file. Places them in a map with the module names as keys -> map containing the module name keys and an unordered map with the ini keys and values.
 
std::vector< std::string > getModuleNames () const
 Getter function for the module names.
 
const std::unordered_map< std::string, std::any > & getModuleContents (const std::string &key)
 

Detailed Description

This class parses ini files from a snapshot file. Currently supported are only the following data types: string/char, int, double, bool. While it does have a fair bit of duplicate code from IniParser, it carries a different datatype and needs other handling, thus making it incompatible.

Constructor & Destructor Documentation

◆ IniParserSnapshot()

IniParserSnapshot::IniParserSnapshot ( const std::string &  filename)

Constructor for the IniParserSnapshot class. Parses all ini data in a MoCSI snapshot file. Places them in a map with the module names as keys -> map containing the module name keys and an unordered map with the ini keys and values.

Parameters
filenameThe file path.

Member Function Documentation

◆ getModuleContents()

const std::unordered_map< std::string, std::any > & IniParserSnapshot::getModuleContents ( const std::string &  key)
inline

◆ getModuleNames()

std::vector< std::string > IniParserSnapshot::getModuleNames ( ) const

Getter function for the module names.


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