A Discrete-Event Network Simulator
API
Public Member Functions | Private Attributes | List of all members
ns3::NscStackStringAccessor Class Reference

This object represent the underlying nsc stack attributes and provide a ns-3-like system to access them though sysctls. More...

+ Inheritance diagram for ns3::NscStackStringAccessor:

Public Member Functions

 NscStackStringAccessor (std::string name)
 Constructor. More...
 
virtual bool Get (const ObjectBase *object, AttributeValue &val) const
 
virtual bool HasGetter (void) const
 
virtual bool HasSetter (void) const
 
virtual bool Set (ObjectBase *object, const AttributeValue &val) const
 
- Public Member Functions inherited from ns3::AttributeAccessor
 AttributeAccessor ()
 
virtual ~AttributeAccessor ()
 
- Public Member Functions inherited from ns3::SimpleRefCount< AttributeAccessor >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Private Attributes

std::string m_name
 name of the attribute More...
 

Detailed Description

This object represent the underlying nsc stack attributes and provide a ns-3-like system to access them though sysctls.

Definition at line 32 of file nsc-sysctl.cc.

Constructor & Destructor Documentation

◆ NscStackStringAccessor()

ns3::NscStackStringAccessor::NscStackStringAccessor ( std::string  name)
inline

Constructor.

Parameters
namename of the attribute

Definition at line 39 of file nsc-sysctl.cc.

Member Function Documentation

◆ Get()

bool ns3::NscStackStringAccessor::Get ( const ObjectBase object,
AttributeValue attribute 
) const
virtual
Parameters
[in,out]objectThe object instance to get the value from
[out]attributeA pointer to where the value should be set.
Returns
true if the value could be read successfully, and stored in the input value, false otherwise.

This method expects that the caller has checked that the input value is valid with AttributeChecker::Check.

Implements ns3::AttributeAccessor.

Definition at line 76 of file nsc-sysctl.cc.

References ns3::Ns3NscStack::Get(), m_name, and ns3::StringValue::Set().

◆ HasGetter()

bool ns3::NscStackStringAccessor::HasGetter ( void  ) const
virtual
Returns
true if this accessor supports the Get operation, false otherwise.

Implements ns3::AttributeAccessor.

Definition at line 49 of file nsc-sysctl.cc.

◆ HasSetter()

bool ns3::NscStackStringAccessor::HasSetter ( void  ) const
virtual
Returns
true if this accessor supports the Set operation, false otherwise.

Implements ns3::AttributeAccessor.

Definition at line 54 of file nsc-sysctl.cc.

◆ Set()

bool ns3::NscStackStringAccessor::Set ( ObjectBase object,
const AttributeValue value 
) const
virtual
Parameters
[in,out]objectThe object instance to set the value in
[in]valueThe value to set
Returns
true if the value could be set successfully, false otherwise.

This method expects that the caller has checked that the input value is valid with AttributeChecker::Check.

Implements ns3::AttributeAccessor.

Definition at line 60 of file nsc-sysctl.cc.

References ns3::StringValue::Get(), m_name, and ns3::Ns3NscStack::Set().

Member Data Documentation

◆ m_name

std::string ns3::NscStackStringAccessor::m_name
private

name of the attribute

Definition at line 46 of file nsc-sysctl.cc.

Referenced by Get(), and Set().


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