113 template <
typename T>
129 template <
typename T>
139 if (value->GetObject () == 0)
143 T *ptr =
dynamic_cast<T*
> (
PeekPointer (value->GetObject ()));
152 return "ns3::PointerValue";
160 TypeId tid = T::GetTypeId ();
161 return "ns3::Ptr< " + tid.
GetName () +
" >";
165 return ns3::Create<PointerValue> ();
171 if (src == 0 || dst == 0)
180 return T::GetTypeId ();
186 template <
typename T>
192 template <
typename T>
199 template <
typename T>
207 template <
typename T>
213 template <
typename T>
229 template <
typename T>
233 return Create<internal::PointerChecker<T> > ();
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
Represent the type of an attribute.
Hold a value for an Attribute.
AttributeChecker implementation for PointerValue.
virtual TypeId GetPointeeTypeId(void) const =0
Get the TypeId of the base type.
Hold objects of type Ptr<T>.
Ptr< Object > m_value
The stored Pointer instance.
virtual std::string SerializeToString(Ptr< const AttributeChecker > checker) const
void Set(const Ptr< T > &value)
Set the value.
virtual bool DeserializeFromString(std::string value, Ptr< const AttributeChecker > checker)
virtual Ptr< AttributeValue > Copy(void) const
void SetObject(Ptr< Object > object)
Set the value from by reference an Object.
bool GetAccessor(Ptr< T > &value) const
Access the Pointer value as type T.
Ptr< Object > GetObject(void) const
Get the Object referenced by the PointerValue.
a unique identifier for an interface.
std::string GetName(void) const
Get the name.
PointerChecker implementation.
virtual TypeId GetPointeeTypeId(void) const
Get the TypeId of the base type.
virtual bool Copy(const AttributeValue &source, AttributeValue &destination) const
Copy the source to the destination.
virtual std::string GetUnderlyingTypeInformation(void) const
virtual bool HasUnderlyingTypeInformation(void) const
virtual Ptr< AttributeValue > Create(void) const
virtual bool Check(const AttributeValue &val) const
virtual std::string GetValueTypeName(void) const
Ptr< AttributeChecker > MakePointerChecker(void)
Create a PointerChecker for a type.
#define ATTRIBUTE_ACCESSOR_DEFINE(type)
Define the attribute accessor functions MakeTypeAccessor for class type.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
U * PeekPointer(const Ptr< U > &p)
ns3::Object class declaration, which is the root of the Object hierarchy and Aggregation.