73 return ns3::Create<ObjectPtrContainerValue> (*
this);
79 std::ostringstream oss;
81 for (it =
Begin (); it !=
End (); ++it)
117 bool ok =
DoGetN (
object, &n);
122 for (std::size_t i = 0; i < n; i++)
Hold a value for an Attribute.
Anchor the ns-3 type and attribute system.
virtual bool Set(ObjectBase *object, const AttributeValue &value) const
virtual bool HasSetter(void) const
virtual bool DoGetN(const ObjectBase *object, std::size_t *n) const =0
Get the number of instances in the container.
virtual bool HasGetter(void) const
virtual bool Get(const ObjectBase *object, AttributeValue &value) const
virtual Ptr< Object > DoGet(const ObjectBase *object, std::size_t i, std::size_t *index) const =0
Get an instance from the container, identified by index.
Container for a set of ns3::Object pointers.
virtual std::string SerializeToString(Ptr< const AttributeChecker > checker) const
Serialize each of the Object pointers to a string.
virtual Ptr< AttributeValue > Copy(void) const
Get a copy of this container.
std::map< std::size_t, Ptr< Object > > m_objects
The container implementation.
std::size_t GetN(void) const
Get the number of Objects.
Iterator Begin(void) const
Get an iterator to the first Object.
ObjectPtrContainerValue()
Default constructor.
virtual bool DeserializeFromString(std::string value, Ptr< const AttributeChecker > checker)
Deserialize from a string.
std::map< std::size_t, Ptr< Object > >::const_iterator Iterator
Iterator type for traversing this container.
Ptr< Object > Get(std::size_t i) const
Get a specific Object.
Iterator End(void) const
Get an iterator to the past-the-end Object.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ObjectPtrContainerValue attribute value declarations and template implementations.