ns3::PointerValue Class Reference
[Attribute]

hold objects of type Ptr<T> More...

#include <pointer.h>

Inheritance diagram for ns3::PointerValue:
Inheritance graph
[legend]
Collaboration diagram for ns3::PointerValue:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PointerValue ()
 PointerValue (Ptr< Object > object)
void SetObject (Ptr< Object > object)
Ptr< ObjectGetObject (void) const
template<typename T >
 PointerValue (const Ptr< T > &object)
template<typename T >
void Set (const Ptr< T > &object)
template<typename T >
Ptr< T > Get (void) const
template<typename T >
bool GetAccessor (Ptr< T > &v) const
template<typename T >
 operator Ptr< T > () const
virtual Ptr< AttributeValueCopy (void) const
virtual std::string SerializeToString (Ptr< const AttributeChecker > checker) const
virtual bool DeserializeFromString (std::string value, Ptr< const AttributeChecker > checker)

Private Attributes

Ptr< Objectm_value

Detailed Description

hold objects of type Ptr<T>

Definition at line 33 of file pointer.h.


Constructor & Destructor Documentation

ns3::PointerValue::PointerValue (  ) 

Definition at line 24 of file pointer.cc.

ns3::PointerValue::PointerValue ( Ptr< Object object  ) 

Definition at line 28 of file pointer.cc.

template<typename T >
ns3::PointerValue::PointerValue ( const Ptr< T > &  object  )  [inline]

Definition at line 134 of file pointer.h.

References m_value.


Member Function Documentation

Ptr< AttributeValue > ns3::PointerValue::Copy ( void   )  const [virtual]
Returns:
a deep copy of this class, wrapped into an Attribute object.

Implements ns3::AttributeValue.

Definition at line 45 of file pointer.cc.

bool ns3::PointerValue::DeserializeFromString ( std::string  value,
Ptr< const AttributeChecker checker 
) [virtual]
Parameters:
value a string representation of the value
checker a pointer to the checker associated to the attribute.
Returns:
true if the input string was correctly-formatted and could be successfully deserialized, false otherwise.

Upon return of this function, this AttributeValue instance contains the deserialized value. In most cases, this method will not make any use of the checker argument. However, in a very limited set of cases, the checker argument is needed to perform proper serialization. A nice example of code which needs it is the EnumValue::SerializeToString code.

Implements ns3::AttributeValue.

Definition at line 58 of file pointer.cc.

References NS_FATAL_ERROR.

template<typename T >
Ptr< T > ns3::PointerValue::Get ( void   )  const [inline]

Definition at line 148 of file pointer.h.

References m_value, and ns3::PeekPointer().

Referenced by ns3::Resolver::DoResolve().

template<typename T >
bool ns3::PointerValue::GetAccessor ( Ptr< T > &  v  )  const [inline]

Definition at line 162 of file pointer.h.

References m_value, and ns3::PeekPointer().

Ptr< Object > ns3::PointerValue::GetObject ( void   )  const

Definition at line 39 of file pointer.cc.

References m_value.

Referenced by ns3::internal::APointerChecker< T >::Check().

template<typename T >
ns3::PointerValue::operator Ptr< T > (  )  const [inline]

Definition at line 155 of file pointer.h.

std::string ns3::PointerValue::SerializeToString ( Ptr< const AttributeChecker checker  )  const [virtual]
Parameters:
checker the checker associated to the attribute
Returns:
a string representation of this value.

In most cases, this method will not make any use of the checker argument. However, in a very limited set of cases, the checker argument is needed to perform proper serialization. A nice example of code which needs it is the EnumValue::SerializeToString code.

Implements ns3::AttributeValue.

Definition at line 50 of file pointer.cc.

References m_value.

template<typename T >
void ns3::PointerValue::Set ( const Ptr< T > &  object  )  [inline]

Definition at line 141 of file pointer.h.

References m_value.

void ns3::PointerValue::SetObject ( Ptr< Object object  ) 

Definition at line 33 of file pointer.cc.

References m_value.


Member Data Documentation

Definition at line 64 of file pointer.h.

Referenced by Get(), GetAccessor(), GetObject(), PointerValue(), SerializeToString(), Set(), and SetObject().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:10:24 2009 for NS-3 by  doxygen 1.6.3