Represents Simics C type conf_class_t. More...
#include <conf-class.h>
Public Member Functions | |
| virtual | ~ConfClass () |
| ConfClass (const ConfClass &)=delete | |
| Avoid implicit copy. | |
| ConfClass & | operator= (const ConfClass &)=delete |
| 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) |
| A function to register that ConfClass implements the iface interface. | |
| ConfClass * | add (const Attribute &attr) |
| A function to add an attribute to the set of attributes of ConfClass. | |
| 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 iface::ObjectFactoryInterface &factory) |
| A function to create a ConfClass instance All parameters except the last one is used to call the Simics C API SIM_create_class. | |
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.
It wraps around a conf_class_t pointer and provides registration support for attribute, interface, log group and port.
No default constructor as it requires a valid pointer of conf_class_t. The only way to create an instance is by calling the function create.
|
virtual |
|
delete |
Avoid implicit copy.
|
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 ConfClassPtr & | port, |
| const std::string & | name | ||
| ) |
| ConfClass * simics::ConfClass::add | ( | const iface::InterfaceInfo & | iface | ) |
|
static |
A 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. |
|
inline |
Return the class description.
|
inline |
Return the class log groups.
|
inline |
Return the class name.
|
inline |
Get a pointer to the configuration class represented.