20 #ifndef OBJECT_FACTORY_H 21 #define OBJECT_FACTORY_H 105 template <
typename T>
170 template <
typename T>
196 template <
typename T>
201 return object->GetObject<T> ();
204 template <
typename T>
227 return factory.
Create<T> ();
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
AttributeConstructionList m_parameters
The list of attributes and values to be used in constructing objects by this factory.
Hold a value for an Attribute.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
ObjectFactory()
Default constructor.
ns3::AttributeConstructionList declaration.
Ptr< T > CreateObjectWithAttributes(std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
Allocate an Object on the heap and initialize with a set of attributes.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
A class for an empty attribute value.
List of Attribute name, value and checker triples used to construct Objects.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TypeId declaration; inline and template implementations.
void Set(std::string name, const AttributeValue &value)
Set an attribute to be set during construction.
TypeId GetTypeId(void) const
Get the TypeId which will be created by this ObjectFactory.
ns3::Object class declaration, which is the root of the Object hierarchy and Aggregation.
friend std::istream & operator>>(std::istream &is, ObjectFactory &factory)
Read a factory configuration from an input stream.
Instantiate subclasses of ns3::Object.
friend std::ostream & operator<<(std::ostream &os, const ObjectFactory &factory)
Print the factory configuration on an output stream.
TypeId m_tid
The TypeId this factory will create.
a unique identifier for an interface.
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type.