Go to the documentation of this file.
51 #ifndef __SIM_CXX_CONFIG_HH__
52 #define __SIM_CXX_CONFIG_HH__
84 bool isVector_,
bool isSimObject_) :
102 bool isVector_,
bool isRequestor_) :
111 std::map<std::string, PortDesc *>
ports;
139 virtual void setName(
const std::string &name_) { }
161 const std::string &value,
const Flags flags)
194 virtual bool getParam(
const std::string &object_name,
195 const std::string ¶m_name,
196 std::string &value)
const = 0;
200 const std::string ¶m_name,
204 virtual bool getPortPeers(
const std::string &object_name,
205 const std::string &port_name,
209 virtual bool objectExists(
const std::string &object_name)
const = 0;
219 bool return_paths =
false)
const = 0;
222 virtual bool load(
const std::string &filename) = 0;
230 extern std::map<std::string, CxxConfigDirectoryEntry *>
237 #endif // __SIM_CXX_CONFIG_HH__
virtual bool setParam(const std::string &name, const std::string &value, const Flags flags)
Set a parameter with a value parsed from the given string.
virtual bool setPortConnectionCount(const std::string &name, unsigned int count)
Set the number of connections expected for the named port.
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.
const bool isSimObject
Is this a SimObject, and so is to be set with setSimObject...
::Flags< FlagsType > Flags
virtual ~CxxConfigFileBase()
static scfx_rep_node * list
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.
virtual SimObject * simObjectCreate()
Create the associated SimObject.
virtual bool getParamVector(const std::string &object_name, const std::string ¶m_name, std::vector< std::string > &values) const =0
Get a list/vector parameter.
virtual CxxConfigParams * makeParamsObject() const
Make a ...Param structure for the SimObject class of this entry.
virtual bool setSimObject(const std::string &name, SimObject *simObject)
Set a SimObject valued parameter with a reference to the given SimObject.
const bool isRequestor
Is this a request or response port.
Similar to ParamDesc to describe ports.
static const std::string invalidName
std::map< std::string, PortDesc * > ports
Ports.
Base for peer classes of SimObjectParams derived classes with parameter modifying member functions.
virtual CxxConfigParams::Flags getFlags() const
Get the flags which should be used to modify parameter parsing behaviour.
virtual const std::string & getName()
Get full path name string.
std::map< std::string, ParamDesc * > parameters
All parameters (including SimObjects) in order.
ParamDesc(const std::string &name_, bool isVector_, bool isSimObject_)
virtual bool setParamVector(const std::string &name, const std::vector< std::string > &values, const Flags flags)
As setParamVector but for parameters given as vectors pre-separated into elements.
Config details entry for a SimObject.
uint32_t FlagsType
Flags passable to setParam...
virtual void setName(const std::string &name_)
Example flag.
virtual bool getParam(const std::string &object_name, const std::string ¶m_name, std::string &value) const =0
Get a single parameter value as a string returned in value.
const std::string & name()
virtual ~CxxConfigDirectoryEntry()
std::map< std::string, CxxConfigDirectoryEntry * > cxx_config_directory
Directory of all SimObject classes config details.
void cxxConfigInit()
Initialise cxx_config_directory.
virtual bool objectExists(const std::string &object_name) const =0
Does an object with this path exist?
virtual void getAllObjectNames(std::vector< std::string > &list) const =0
Get all SimObjects in the config.
Config file wrapper providing a common interface to CxxConfigManager.
PortDesc(const std::string &name_, bool isVector_, bool isRequestor_)
virtual ~CxxConfigParams()
virtual bool setSimObjectVector(const std::string &name, const std::vector< SimObject * > &simObjects)
As setSimObjectVector but set a whole vector of references.
virtual bool load(const std::string &filename)=0
Load config file.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17