20 #ifndef OBJECT_VECTOR_H
21 #define OBJECT_VECTOR_H
47 template <
typename T,
typename U>
60 template <
typename T,
typename U,
typename INDEX>
63 INDEX (T::*getN)(
void)
const);
69 template <
typename T,
typename U,
typename INDEX>
79 template <
typename T,
typename U>
85 virtual bool DoGetN (
const ObjectBase *
object, std::size_t *n)
const
87 const T *obj =
dynamic_cast<const T *
> (
object);
92 *n = (obj->*m_memberVector).size ();
97 const T *obj =
static_cast<const T *
> (
object);
98 typename U::const_iterator begin = (obj->*m_memberVector).begin ();
99 typename U::const_iterator end = (obj->*m_memberVector).end ();
101 for (
typename U::const_iterator j = begin; j != end; j++,
k++)
114 U T::*m_memberVector;
115 } *spec =
new MemberStdContainer ();
116 spec->m_memberVector = memberVector;
120 template <
typename T>
123 return MakeObjectPtrContainerChecker<T> ();
126 template <
typename T,
typename U,
typename INDEX>
127 Ptr<const AttributeAccessor>
129 INDEX (T::*getN)(
void)
const)
131 return MakeObjectPtrContainerAccessor<T,U,INDEX> (
get, getN);
134 template <
typename T,
typename U,
typename INDEX>
135 Ptr<const AttributeAccessor>
139 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,...
Ptr< const AttributeChecker > MakeObjectVectorChecker(void)
ObjectPtrContainerValue ObjectVectorValue
ObjectVectorValue is an alias for ObjectPtrContainerValue.
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
auto get(const nlohmann::detail::iteration_proxy_value< IteratorType > &i) -> decltype(i.key())
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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.