gem5  v20.1.0.0
Public Member Functions | List of all members
CxxConfigFileBase Class Referenceabstract

Config file wrapper providing a common interface to CxxConfigManager. More...

#include <cxx_config.hh>

Inheritance diagram for CxxConfigFileBase:
CxxIniFile

Public Member Functions

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

Detailed Description

Config file wrapper providing a common interface to CxxConfigManager.

Definition at line 185 of file cxx_config.hh.

Constructor & Destructor Documentation

◆ CxxConfigFileBase()

CxxConfigFileBase::CxxConfigFileBase ( )
inline

Definition at line 188 of file cxx_config.hh.

◆ ~CxxConfigFileBase()

virtual CxxConfigFileBase::~CxxConfigFileBase ( )
inlinevirtual

Definition at line 189 of file cxx_config.hh.

Member Function Documentation

◆ getAllObjectNames()

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

Get all SimObjects in the config.

Implemented in CxxIniFile.

Referenced by CxxConfigManager::findAllObjects().

◆ getFlags()

virtual CxxConfigParams::Flags CxxConfigFileBase::getFlags ( ) const
inlinevirtual

Get the flags which should be used to modify parameter parsing behaviour.

Definition at line 226 of file cxx_config.hh.

◆ getObjectChildren()

virtual void CxxConfigFileBase::getObjectChildren ( const std::string &  object_name,
std::vector< std::string > &  children,
bool  return_paths = false 
) const
pure 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

Implemented in CxxIniFile.

Referenced by CxxConfigManager::findObject(), and CxxConfigManager::findTraversalOrder().

◆ getParam()

virtual bool CxxConfigFileBase::getParam ( const std::string &  object_name,
const std::string &  param_name,
std::string &  value 
) const
pure 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"

Implemented in CxxIniFile.

Referenced by CxxConfigManager::findObject(), CxxConfigManager::findObjectParams(), and CxxConfigManager::findObjectType().

◆ getParamVector()

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

Get a list/vector parameter.

Implemented in CxxIniFile.

Referenced by CxxConfigManager::findObject(), and CxxConfigManager::findObjectParams().

◆ getPortPeers()

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

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

Implemented in CxxIniFile.

Referenced by CxxConfigManager::bindObjectPorts(), and CxxConfigManager::findObjectParams().

◆ load()

virtual bool CxxConfigFileBase::load ( const std::string &  filename)
pure virtual

Load config file.

Implemented in CxxIniFile.

◆ objectExists()

virtual bool CxxConfigFileBase::objectExists ( const std::string &  object_name) const
pure virtual

Does an object with this path exist?

Implemented in CxxIniFile.

Referenced by CxxConfigManager::findObjectType().


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

Generated on Wed Sep 30 2020 14:02:23 for gem5 by doxygen 1.8.17