Go to the documentation of this file.
51 #ifndef __SIM_CXX_CONFIG_HH__
52 #define __SIM_CXX_CONFIG_HH__
63 class CxxConfigParams;
87 bool isVector_,
bool isSimObject_) :
105 bool isVector_,
bool isRequestor_) :
114 std::map<std::string, PortDesc *>
ports;
141 "Failed to insert config directory entry %s (duplicate?).",
157 virtual void setName(
const std::string &name_) { }
212 virtual bool getParam(
const std::string &object_name,
213 const std::string ¶m_name,
214 std::string &value)
const = 0;
218 const std::string ¶m_name,
222 virtual bool getPortPeers(
const std::string &object_name,
223 const std::string &port_name,
227 virtual bool objectExists(
const std::string &object_name)
const = 0;
237 bool return_paths =
false)
const = 0;
240 virtual bool load(
const std::string &filename) = 0;
249 #endif // __SIM_CXX_CONFIG_HH__
virtual void getAllObjectNames(std::vector< std::string > &list) const =0
Get all SimObjects in the config.
virtual ~CxxConfigFileBase()
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.
static const std::string invalidName
uint32_t FlagsType
Flags passable to setParam...
virtual bool setPortConnectionCount(const std::string &name, unsigned int count)
Set the number of connections expected for the named port.
gem5::Flags< FlagsType > Flags
virtual bool setSimObject(const std::string &name, SimObject *simObject)
Set a SimObject valued parameter with a reference to the given SimObject.
std::map< std::string, ParamDesc * > parameters
All parameters (including SimObjects) in order.
Base for peer classes of SimObjectParams derived classes with parameter modifying member functions.
static scfx_rep_node * list
PortDesc(const std::string &name_, bool isVector_, bool isRequestor_)
virtual ~CxxConfigParams()
virtual CxxConfigParams * makeParamsObject() const
Make a ...Param structure for the SimObject class of this entry.
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.
std::map< std::string, CxxConfigDirectoryEntry * > & cxxConfigDirectory()
Directory of all SimObject classes config details.
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.
Abstract superclass for simulation objects.
Similar to ParamDesc to describe ports.
AddToConfigDir(const std::string &name, CxxConfigDirectoryEntry *entry)
ParamDesc(const std::string &name_, bool isVector_, bool isSimObject_)
const std::string & name()
std::map< std::string, PortDesc * > ports
Ports.
Config file wrapper providing a common interface to CxxConfigManager.
virtual bool load(const std::string &filename)=0
Load config file.
virtual const std::string & getName()
Get full path name string.
virtual bool objectExists(const std::string &object_name) const =0
Does an object with this path exist?
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
virtual void setName(const std::string &name_)
Example flag.
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 ~CxxConfigDirectoryEntry()
Config details entry for a SimObject.
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.
virtual CxxConfigParams::Flags getFlags() const
Get the flags which should be used to modify parameter parsing behaviour.
const bool isSimObject
Is this a SimObject, and so is to be set with setSimObject...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
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 SimObject * simObjectCreate()
Create the associated SimObject.
virtual bool setSimObjectVector(const std::string &name, const std::vector< SimObject * > &simObjects)
As setSimObjectVector but set a whole vector of references.
const bool isRequestor
Is this a request or response port.
Generated on Sun Jul 30 2023 01:56:59 for gem5 by doxygen 1.8.17