47template <
typename T,
typename U>
58template <
typename T,
typename U,
typename INDEX>
60 INDEX (T::*getN)()
const);
66template <
typename T,
typename U,
typename INDEX>
68 Ptr<U> (T::*get)(INDEX)
const);
74template <
typename T,
typename U>
80 bool DoGetN(
const ObjectBase*
object, std::size_t* n)
const override
82 const T* obj =
dynamic_cast<const T*
>(
object);
87 *n = (obj->*m_memberVector).size();
93 std::size_t* index)
const override
95 const T* obj =
static_cast<const T*
>(
object);
96 auto begin = (obj->*m_memberVector).begin();
97 auto end = (obj->*m_memberVector).end();
99 for (
auto j = begin; j != end; j++, k++)
112 U T::*m_memberVector;
113 }* spec =
new MemberStdContainer();
115 spec->m_memberVector = memberVector;
120Ptr<const AttributeChecker>
123 return MakeObjectPtrContainerChecker<T>();
126template <
typename T,
typename U,
typename INDEX>
127Ptr<const AttributeAccessor>
130 return MakeObjectPtrContainerAccessor<T, U, INDEX>(get, getN);
133template <
typename T,
typename U,
typename INDEX>
134Ptr<const AttributeAccessor>
137 return MakeObjectPtrContainerAccessor<T, U, INDEX>(get, getN);
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
Anchor the ns-3 type and attribute system.
AttributeAccessor implementation for ObjectPtrContainerValue.
Container for a set of ns3::Object pointers.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ObjectPtrContainerValue ObjectMapValue
ObjectMapValue is an alias for ObjectPtrContainerValue.
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
Ptr< const AttributeChecker > MakeObjectMapChecker()
ns3::ObjectPtrContainerValue attribute value declarations and template implementations.
ns3::Object class declaration, which is the root of the Object hierarchy and Aggregation.
ns3::Ptr smart pointer declaration and implementation.