gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
CxxIniFile Class Reference

CxxConfigManager interface for using .ini files. More...

#include <cxx_config_ini.hh>

Inheritance diagram for CxxIniFile:
CxxConfigFileBase

Public Member Functions

 CxxIniFile ()
 
bool getParam (const std::string &object_name, const std::string &param_name, std::string &value) const
 Get a single parameter value as a string returned in value. More...
 
bool getParamVector (const std::string &object_name, const std::string &param_name, std::vector< std::string > &values) const
 Get a list/vector parameter. More...
 
bool getPortPeers (const std::string &object_name, const std::string &port_name, std::vector< std::string > &peers) const
 Get the peer (connected) ports of the named ports. More...
 
bool objectExists (const std::string &object_name) const
 Does an object with this path exist? More...
 
void getAllObjectNames (std::vector< std::string > &list) const
 Get all SimObjects in the config. More...
 
void getObjectChildren (const std::string &object_name, std::vector< std::string > &children, bool return_paths=false) const
 Get the names or paths of all the children SimObjects of this SimObject. More...
 
bool load (const std::string &filename)
 Load config file. More...
 
- Public Member Functions inherited from CxxConfigFileBase
 CxxConfigFileBase ()
 
virtual ~CxxConfigFileBase ()
 
virtual CxxConfigParams::Flags getFlags () const
 Get the flags which should be used to modify parameter parsing behaviour. More...
 

Protected Attributes

IniFile iniFile
 

Detailed Description

CxxConfigManager interface for using .ini files.

Definition at line 53 of file cxx_config_ini.hh.

Constructor & Destructor Documentation

CxxIniFile::CxxIniFile ( )
inline

Definition at line 59 of file cxx_config_ini.hh.

Member Function Documentation

void CxxIniFile::getAllObjectNames ( std::vector< std::string > &  list) const
virtual

Get all SimObjects in the config.

Implements CxxConfigFileBase.

Definition at line 84 of file cxx_config_ini.cc.

References IniFile::getSectionNames(), and iniFile.

void CxxIniFile::getObjectChildren ( const std::string &  object_name,
std::vector< std::string > &  children,
bool  return_paths = false 
) const
virtual

Get the names or paths of all the children SimObjects of this SimObject.

If return_paths is true then full paths are returned. If false, only the last name component for each object is returned

Implements CxxConfigFileBase.

Definition at line 90 of file cxx_config_ini.cc.

References getParamVector(), and ArmISA::i.

bool CxxIniFile::getParam ( const std::string &  object_name,
const std::string &  param_name,
std::string &  value 
) const
virtual

Get a single parameter value as a string returned in value.

For booleans, the function expects "true" or "false" in value. For NULL SimObjects, it expects "Null"

Implements CxxConfigFileBase.

Definition at line 45 of file cxx_config_ini.cc.

References IniFile::find(), and iniFile.

bool CxxIniFile::getParamVector ( const std::string &  object_name,
const std::string &  param_name,
std::vector< std::string > &  values 
) const
virtual

Get a list/vector parameter.

Implements CxxConfigFileBase.

Definition at line 53 of file cxx_config_ini.cc.

References IniFile::find(), iniFile, and tokenize().

Referenced by getObjectChildren(), and getPortPeers().

bool CxxIniFile::getPortPeers ( const std::string &  object_name,
const std::string &  port_name,
std::vector< std::string > &  peers 
) const
virtual

Get the peer (connected) ports of the named ports.

Implements CxxConfigFileBase.

Definition at line 70 of file cxx_config_ini.cc.

References getParamVector().

bool CxxIniFile::load ( const std::string &  filename)
virtual

Load config file.

Implements CxxConfigFileBase.

Definition at line 103 of file cxx_config_ini.cc.

References iniFile, and IniFile::load().

bool CxxIniFile::objectExists ( const std::string &  object_name) const
virtual

Does an object with this path exist?

Implements CxxConfigFileBase.

Definition at line 78 of file cxx_config_ini.cc.

References iniFile, and IniFile::sectionExists().

Member Data Documentation

IniFile CxxIniFile::iniFile
protected

Definition at line 56 of file cxx_config_ini.hh.

Referenced by getAllObjectNames(), getParam(), getParamVector(), load(), and objectExists().


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

Generated on Fri Jun 9 2017 13:04:06 for gem5 by doxygen 1.8.6