34template <
typename TParent>
39 parent_(
from_obj<TParent>(parent_conf_obj())),
41 strlen(SIM_object_name(parent_conf_obj())) + 1)),
52 const std::string &
name() {
64 auto p = SIM_port_object_parent(
obj());
66 throw std::runtime_error {
67 "No parent found for " +
obj().
name()
struct conf_object conf_object_t
Definition: bank-issue-callbacks-interface.h:23
Represents Simics C type conf_object_t.
Definition: conf-object.h:37
const std::string & name() const
Get the name of the underlying configuration object.
A class inherited by a model class to support Simics configuration.
Definition: conf-object.h:114
ConfObjectRef obj() const
Return a ConfObjectRef represents this object.
Definition: conf-object.h:134
Represents a Simics port object base class.
Definition: port.h:35
TParent * parent() const
Return a pointer to the C++ object associated with the Simics parent object.
Definition: port.h:47
Port(const ConfObjectRef &obj)
Definition: port.h:37
const std::string & name()
Return the port name.
Definition: port.h:52
int index() const
Return the index of an array-type object name.
Definition: port.h:57
Definition: attr-value.h:23
T * from_obj(conf_object_t *obj)
Utility function to convert a conf_object_t* to a pointer to C++ class derived from simics::ConfObjec...
Definition: conf-object.h:151
int array_index(const std::string &name)
Return the array index if name is using an array format like array[N].