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>
78 template <
typename T,
typename U>
84 virtual bool DoGetN (
const ObjectBase *
object, std::size_t *n)
const
86 const T *obj =
dynamic_cast<const T *
> (
object);
91 *n = (obj->*m_memberVector).size ();
96 const T *obj =
static_cast<const T *
> (
object);
97 typename U::const_iterator begin = (obj->*m_memberVector).begin ();
98 typename U::const_iterator end = (obj->*m_memberVector).end ();
100 for (
typename U::const_iterator j = begin; j != end; j++,
k++)
113 U T::*m_memberVector;
114 } *spec =
new MemberStdContainer ();
115 spec->m_memberVector = memberVector;
119 template <
typename T>
122 return MakeObjectPtrContainerChecker<T> ();
125 template <
typename T,
typename U,
typename INDEX>
126 Ptr<const AttributeAccessor>
128 INDEX (T::*getN)(
void)
const)
130 return MakeObjectPtrContainerAccessor<T,U,INDEX> (
get, getN);
133 template <
typename T,
typename U,
typename INDEX>
134 Ptr<const AttributeAccessor>
138 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,...
ObjectPtrContainerValue ObjectMapValue
ObjectMapValue is an alias for ObjectPtrContainerValue.
Ptr< const AttributeChecker > MakeObjectMapChecker(void)
Ptr< const AttributeAccessor > MakeObjectMapAccessor(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.