Public Member Functions | Friends

ns3::ObjectFactory Class Reference
[Object]

instantiate subclasses of ns3::Object. More...

#include <object-factory.h>

Collaboration diagram for ns3::ObjectFactory:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void SetTypeId (TypeId tid)
void SetTypeId (const char *tid)
void SetTypeId (std::string tid)
void Set (std::string name, const AttributeValue &value)
void Set (const AttributeList &list)
TypeId GetTypeId (void) const
Ptr< ObjectCreate (void) const
template<typename T >
Ptr< T > Create (void) const

Friends

std::ostream & operator<< (std::ostream &os, const ObjectFactory &factory)
std::istream & operator>> (std::istream &is, ObjectFactory &factory)

Detailed Description

instantiate subclasses of ns3::Object.

This class can also hold a set of attributes to set automatically during the object construction.


Member Function Documentation

Ptr< T > ns3::ObjectFactory::Create ( void   )  const
Returns:
a new object instance.
template<typename T >
Ptr<T> ns3::ObjectFactory::Create ( void   )  const
Returns:
a new object instance.

This method performs an extra call to ns3::Object::GetObject before returning a pointer of the requested type to the user. This method is really syntactical sugar.

TypeId ns3::ObjectFactory::GetTypeId ( void   )  const
Returns:
the currently-selected TypeId to use to create an object instance.
void ns3::ObjectFactory::Set ( std::string  name,
const AttributeValue value 
)
Parameters:
name the name of the attribute to set during object construction
value the value of the attribute to set during object construction
void ns3::ObjectFactory::SetTypeId ( const char *  tid  ) 
Parameters:
tid the TypeId of the object to instantiate.
void ns3::ObjectFactory::SetTypeId ( TypeId  tid  ) 
Parameters:
tid the TypeId of the object to instantiate.
void ns3::ObjectFactory::SetTypeId ( std::string  tid  ) 
Parameters:
tid the TypeId of the object to instantiate.

The documentation for this class was generated from the following file: