gem5  v21.1.0.2
Public Types | Public Member Functions | Static Private Attributes | List of all members
gem5::CxxConfigParams Class Reference

Base for peer classes of SimObjectParams derived classes with parameter modifying member functions. More...

#include <cxx_config.hh>

Public Types

typedef uint32_t FlagsType
 Flags passable to setParam... More...
 
typedef gem5::Flags< FlagsTypeFlags
 

Public Member Functions

virtual void setName (const std::string &name_)
 Example flag. More...
 
virtual const std::string & getName ()
 Get full path name string. More...
 
virtual bool setSimObject (const std::string &name, SimObject *simObject)
 Set a SimObject valued parameter with a reference to the given SimObject. More...
 
virtual bool setSimObjectVector (const std::string &name, const std::vector< SimObject * > &simObjects)
 As setSimObjectVector but set a whole vector of references. More...
 
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. More...
 
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. More...
 
virtual bool setPortConnectionCount (const std::string &name, unsigned int count)
 Set the number of connections expected for the named port. More...
 
virtual SimObjectsimObjectCreate ()
 Create the associated SimObject. More...
 
 CxxConfigParams ()
 
virtual ~CxxConfigParams ()
 

Static Private Attributes

static const std::string invalidName = "<invalid>"
 

Detailed Description

Base for peer classes of SimObjectParams derived classes with parameter modifying member functions.

C++ configuration will offer objects of these classes to SimObjects as params rather than SimObjectParams objects

Definition at line 126 of file cxx_config.hh.

Member Typedef Documentation

◆ Flags

Definition at line 135 of file cxx_config.hh.

◆ FlagsType

Flags passable to setParam...

to smooth over any parsing difference between different config files

Definition at line 134 of file cxx_config.hh.

Constructor & Destructor Documentation

◆ CxxConfigParams()

gem5::CxxConfigParams::CxxConfigParams ( )
inline

Definition at line 182 of file cxx_config.hh.

◆ ~CxxConfigParams()

virtual gem5::CxxConfigParams::~CxxConfigParams ( )
inlinevirtual

Definition at line 184 of file cxx_config.hh.

Member Function Documentation

◆ getName()

virtual const std::string& gem5::CxxConfigParams::getName ( )
inlinevirtual

Get full path name string.

Definition at line 145 of file cxx_config.hh.

References invalidName.

Referenced by gem5::CxxConfigManager::deleteObjects().

◆ setName()

virtual void gem5::CxxConfigParams::setName ( const std::string &  name_)
inlinevirtual

Example flag.

Set future object's full path name

Definition at line 142 of file cxx_config.hh.

Referenced by gem5::CxxConfigManager::findObjectParams().

◆ setParam()

virtual bool gem5::CxxConfigParams::setParam ( const std::string &  name,
const std::string &  value,
const Flags  flags 
)
inlinevirtual

Set a parameter with a value parsed from the given string.

The parsing regime matches the format of .ini config files. Returns false if the parameter name is not valid or the string cannot be parsed as the type of the parameter

Definition at line 163 of file cxx_config.hh.

Referenced by gem5::CxxConfigManager::findObjectParams(), and gem5::CxxConfigManager::setParam().

◆ setParamVector()

virtual bool gem5::CxxConfigParams::setParamVector ( const std::string &  name,
const std::vector< std::string > &  values,
const Flags  flags 
)
inlinevirtual

As setParamVector but for parameters given as vectors pre-separated into elements.

Definition at line 169 of file cxx_config.hh.

Referenced by gem5::CxxConfigManager::findObjectParams(), and gem5::CxxConfigManager::setParamVector().

◆ setPortConnectionCount()

virtual bool gem5::CxxConfigParams::setPortConnectionCount ( const std::string &  name,
unsigned int  count 
)
inlinevirtual

Set the number of connections expected for the named port.

Returns false if the port name is not valid

Definition at line 175 of file cxx_config.hh.

Referenced by gem5::CxxConfigManager::findObjectParams().

◆ setSimObject()

virtual bool gem5::CxxConfigParams::setSimObject ( const std::string &  name,
SimObject simObject 
)
inlinevirtual

Set a SimObject valued parameter with a reference to the given SimObject.

This will return false if the parameter name is not valid or the object is of the wrong type

Definition at line 150 of file cxx_config.hh.

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

◆ setSimObjectVector()

virtual bool gem5::CxxConfigParams::setSimObjectVector ( const std::string &  name,
const std::vector< SimObject * > &  simObjects 
)
inlinevirtual

As setSimObjectVector but set a whole vector of references.

Definition at line 155 of file cxx_config.hh.

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

◆ simObjectCreate()

virtual SimObject* gem5::CxxConfigParams::simObjectCreate ( )
inlinevirtual

Create the associated SimObject.

Definition at line 180 of file cxx_config.hh.

Referenced by gem5::CxxConfigManager::findObject().

Member Data Documentation

◆ invalidName

const std::string gem5::CxxConfigParams::invalidName = "<invalid>"
staticprivate

Definition at line 129 of file cxx_config.hh.

Referenced by getName().


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

Generated on Tue Sep 21 2021 12:27:29 for gem5 by doxygen 1.8.17