C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
simics::ConfObjectRef Class Reference

Represents Simics C type conf_object_t. More...

#include <conf-object.h>

Public Member Functions

 ConfObjectRef (conf_object_t *obj=nullptr)
 Not explicit constructor, allow conversion of conf_object_t to ConfObjectRef.
 
virtual ~ConfObjectRef ()=default
 
conf_object_t * object () const
 Get a pointer to the configuration object represented by this ConfObjectRef.
 
 operator conf_object_t * () const
 
const std::string & port_name () const
 Get & set name for the port implements the interface.
 
void set_port_name (const std::string &name)
 
void * data () const
 Get the data of the underlying configuration object.
 
std::string name () const
 Get the name of the underlying configuration object.
 
void require () const
 Ensure that the configuration object is instantiated (this is the same as calling SIM_require_object(object())
 
bool configured () const
 Return true if the configuration object is configured, false otherwise.
 
conf_object_t * port_obj_parent () const
 Return the parent object if the object is a port object, nullptr otherwise.
 
ConfObjectas_conf_object () const
 Get a reference to the associated ConfObject.
 
const interface_tget_interface (const std::string &name) const
 Return an interface implemented by the underlying configuration object.
 
uint64 group_id (const std::string &name) const
 

Detailed Description

Represents Simics C type conf_object_t.

See also
conf_object_t

Constructor & Destructor Documentation

◆ ConfObjectRef()

simics::ConfObjectRef::ConfObjectRef ( conf_object_t *  obj = nullptr)
inline

Not explicit constructor, allow conversion of conf_object_t to ConfObjectRef.

Parameters
objThe configuration object that will be represented by this ConfObjectRef

◆ ~ConfObjectRef()

virtual simics::ConfObjectRef::~ConfObjectRef ( )
virtualdefault

Member Function Documentation

◆ as_conf_object()

ConfObject & simics::ConfObjectRef::as_conf_object ( ) const

Get a reference to the associated ConfObject.

◆ configured()

bool simics::ConfObjectRef::configured ( ) const

Return true if the configuration object is configured, false otherwise.

This is the same as calling SIM_object_is_configured(object())

◆ data()

void * simics::ConfObjectRef::data ( ) const

Get the data of the underlying configuration object.

◆ get_interface()

const interface_t * simics::ConfObjectRef::get_interface ( const std::string &  name) const

Return an interface implemented by the underlying configuration object.

It is suggested to cache the result rather than do it repeatedly to increase performance.

Parameters
nameThe name of the interface
Returns
A pointer to the interface struct, or nullptr if the interface is not implemented by the underlying configuration object

◆ group_id()

uint64 simics::ConfObjectRef::group_id ( const std::string &  name) const

◆ name()

std::string simics::ConfObjectRef::name ( ) const

Get the name of the underlying configuration object.

◆ object()

conf_object_t * simics::ConfObjectRef::object ( ) const
inline

Get a pointer to the configuration object represented by this ConfObjectRef.

◆ operator conf_object_t *()

simics::ConfObjectRef::operator conf_object_t * ( ) const
inline

◆ port_name()

const std::string & simics::ConfObjectRef::port_name ( ) const
inline

Get & set name for the port implements the interface.

◆ port_obj_parent()

conf_object_t * simics::ConfObjectRef::port_obj_parent ( ) const

Return the parent object if the object is a port object, nullptr otherwise.

◆ require()

void simics::ConfObjectRef::require ( ) const

Ensure that the configuration object is instantiated (this is the same as calling SIM_require_object(object())

◆ set_port_name()

void simics::ConfObjectRef::set_port_name ( const std::string &  name)
inline

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