Represents Simics C type conf_class_t. More...
#include <conf-class.h>
Public Member Functions | |
| ConfClass (const ConfClass &)=delete | |
| Avoid implicit copy. | |
| ConfClass & | operator= (const ConfClass &)=delete |
| virtual | ~ConfClass () |
| operator conf_class_t * () const | |
| Get a pointer to the configuration class represented. | |
| const std::string & | name () const |
| Return the class name. | |
| const std::string & | description () const |
| Return the class description. | |
| const std::vector< std::string > & | log_groups () const |
| Return the class log groups. | |
| ConfClass * | add (const iface::InterfaceInfo &iface) |
| Stores the provided InterfaceInfo for later registration. | |
| ConfClass * | add (const Attribute &attr) |
| A function to add an attribute to the set of attributes of ConfClass. | |
| ConfClass * | add (const ClassAttribute &attr) |
| ConfClass * | add (const char *const *names) |
| Functions to add log groups that an object can use to separate messages. | |
| ConfClass * | add (const LogGroups &names) |
| ConfClass * | add (ConfClass *port, const std::string &name) |
| A function to add a port object to the set of ports defined by the class. | |
| ConfClass * | add (const ConfClassPtr &port, const std::string &name) |
| ConfClass * | add (EventInfo &&event) |
| A function to add an event to the set of events of ConfClass. | |
Static Public Member Functions | |
| static ConfClassPtr | createInstance (const std::string &name, const std::string &short_desc, const std::string &description, const class_kind_t kind, const ObjectFactoryInterface &factory) |
| Factory function to create a ConfClass instance All parameters except the last one is used to call the Simics C API SIM_create_class. | |
| static uint64 | getGroupId (conf_class_t *cls, const std::string &name) |
| Return the ID of a log group. | |
Protected Member Functions | |
| ConfClass (conf_class_t *cls, const std::string &name, const std::string &description) | |
| Must use factory method to create instance. | |
Represents Simics C type conf_class_t.
This class serves as a wrapper around a conf_class_t pointer, providing comprehensive support for the registration of attributes, interfaces, log groups, and ports.
Instances of this class cannot be created using a default constructor, as a valid conf_class_t pointer is required for initialization. To ensure proper setup and validation, the class employs a static factory function, createInstance, as the sole method for instantiation.
|
delete |
Avoid implicit copy.
|
virtual |
|
inlineexplicitprotected |
Must use factory method to create instance.
A function to add a port object to the set of ports defined by the class.
| port | a ConfClass to be used as port object |
| name | the name of the port object |
If the name contains a pair of brackets, for instance, "port.array[2]" registers a port array with two ports "port.array[0]" and "port.array[1]" Multidimensional array format is not supported
| ConfClass * simics::ConfClass::add | ( | const char *const * | names | ) |
Functions to add log groups that an object can use to separate messages.
A class may have up to 63 user-defined log groups. The Simics log groups can be registered either by calling these functions one or more times, or by calling the SIM_log_register_groups C API function directly. It is not permitted to use both of them in one ConfClass.
| names | either a NULL-terminated array or a list of strings contains names of the log groups |
| ConfClass * simics::ConfClass::add | ( | const ClassAttribute & | attr | ) |
| ConfClass * simics::ConfClass::add | ( | const ConfClassPtr & | port, |
| const std::string & | name | ||
| ) |
| ConfClass * simics::ConfClass::add | ( | const iface::InterfaceInfo & | iface | ) |
|
static |
Factory function to create a ConfClass instance All parameters except the last one is used to call the Simics C API SIM_create_class.
May raise runtime_error if the creation failed.
| factory | an interface to create ConfObject. |
| const std::string & simics::ConfClass::description | ( | ) | const |
Return the class description.
|
static |
Return the ID of a log group.
| const std::vector< std::string > & simics::ConfClass::log_groups | ( | ) | const |
Return the class log groups.
| const std::string & simics::ConfClass::name | ( | ) | const |
Return the class name.
| simics::ConfClass::operator conf_class_t * | ( | ) | const |
Get a pointer to the configuration class represented.