47 template <
typename T,
typename U>
59 template <
typename T,
typename U,
typename INDEX>
62 INDEX (T::*getN)(
void)
const);
68 template <
typename T,
typename U,
typename INDEX>
71 Ptr<U> (T::*
get)(INDEX)
const);
78 template <
typename T,
typename U>
84 virtual bool DoGetN (
const ObjectBase *
object, std::size_t *
n)
const {
85 const T *obj =
dynamic_cast<const T *
> (object);
90 *
n = (obj->*m_memberVector).size ();
94 const T *obj =
static_cast<const T *
> (object);
95 typename U::const_iterator begin = (obj->*m_memberVector).begin ();
96 typename U::const_iterator end = (obj->*m_memberVector).end ();
98 for (
typename U::const_iterator j = begin; j != end; j++, k++)
111 U T::*m_memberVector;
112 } *spec =
new MemberStdContainer ();
113 spec->m_memberVector = memberVector;
117 template <
typename T>
120 return MakeObjectPtrContainerChecker<T> ();
123 template <
typename T,
typename U,
typename INDEX>
124 Ptr<const AttributeAccessor>
126 INDEX (T::*getN)(
void)
const)
128 return MakeObjectPtrContainerAccessor<T,U,INDEX>(
get, getN);
131 template <
typename T,
typename U,
typename INDEX>
132 Ptr<const AttributeAccessor>
134 Ptr<U> (T::*
get)(INDEX)
const)
136 return MakeObjectPtrContainerAccessor<T,U,INDEX>(
get, getN);
Smart pointer class similar to boost::intrusive_ptr.
ns3::Ptr smart pointer declaration and implementation.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Anchor the ns-3 type and attribute system.
ns3::ObjectPtrContainerValue attribute value declarations and template implementations.
AttributeAccessor implementation for ObjectPtrContainerValue.
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Object class declaration, which is the root of the Object hierarchy and Aggregation.
ObjectPtrContainerValue ObjectMapValue
ObjectMapValue is an alias for ObjectPtrContainerValue.
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
Container for a set of ns3::Object pointers.
Ptr< const AttributeChecker > MakeObjectMapChecker(void)