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

Represents a Simics attribute. More...

#include <attribute.h>

Public Member Functions

 Attribute (const std::string &name, const std::string &type, const std::string &desc, attr_getter getter, attr_setter setter, attr_attr_t attr)
 
 Attribute (const std::string &name, const std::string &type, const std::string &desc, attr_getter getter, attr_setter setter)
 
template<typename CLASS , typename MEMBER , MEMBER m>
 Attribute (const std::string &name, const std::string &type, const std::string &desc, AttributeAccessor< CLASS, MEMBER, m > ref, attr_attr_t attr=Sim_Attr_Optional)
 
virtual ~Attribute ()=default
 
 Attribute (Attribute &&)=default
 
virtual const std::string & name () const
 
virtual const std::string & type () const
 
virtual const std::string & desc () const
 
virtual attr_getter getter () const
 
virtual attr_setter setter () const
 
virtual attr_attr_t attr () const
 

Detailed Description

Represents a Simics attribute.

Constructor & Destructor Documentation

◆ Attribute() [1/4]

simics::Attribute::Attribute ( const std::string &  name,
const std::string &  type,
const std::string &  desc,
attr_getter  getter,
attr_setter  setter,
attr_attr_t  attr 
)
inline
See also
SIM_register_attribute
Parameters
namethe attribute name
typethe attribute type string, see SIM_register_attribute
descthe attribute description
gettera callback to get the current value of the attribute
settera callback to set the current value of the attribute
attrone of Sim_Attr_Required, Sim_Attr_Optional or Sim_Attr_Pseudo

◆ Attribute() [2/4]

simics::Attribute::Attribute ( const std::string &  name,
const std::string &  type,
const std::string &  desc,
attr_getter  getter,
attr_setter  setter 
)
inline

◆ Attribute() [3/4]

template<typename CLASS , typename MEMBER , MEMBER m>
simics::Attribute::Attribute ( const std::string &  name,
const std::string &  type,
const std::string &  desc,
AttributeAccessor< CLASS, MEMBER, m >  ref,
attr_attr_t  attr = Sim_Attr_Optional 
)
inline
Parameters
refan AttributeAccessor class instance

◆ ~Attribute()

virtual simics::Attribute::~Attribute ( )
virtualdefault

◆ Attribute() [4/4]

simics::Attribute::Attribute ( Attribute &&  )
default

Member Function Documentation

◆ attr()

virtual attr_attr_t simics::Attribute::attr ( ) const
inlinevirtual

◆ desc()

virtual const std::string & simics::Attribute::desc ( ) const
inlinevirtual

◆ getter()

virtual attr_getter simics::Attribute::getter ( ) const
inlinevirtual

◆ name()

virtual const std::string & simics::Attribute::name ( ) const
inlinevirtual

◆ setter()

virtual attr_setter simics::Attribute::setter ( ) const
inlinevirtual

◆ type()

virtual const std::string & simics::Attribute::type ( ) const
inlinevirtual

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