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

 ObjectFactory ()
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

Private Attributes

TypeId m_tid
AttributeList m_parameters

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.

Definition at line 39 of file object-factory.h.


Constructor & Destructor Documentation

ns3::ObjectFactory::ObjectFactory (  ) 

Definition at line 23 of file object-factory.cc.


Member Function Documentation

template<typename T >
Ptr<T> ns3::ObjectFactory::Create ( void   )  const [inline]
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.

Ptr< T > ns3::ObjectFactory::Create ( void   )  const [inline]
TypeId ns3::ObjectFactory::GetTypeId ( void   )  const
Returns:
the currently-selected TypeId to use to create an object instance.

Definition at line 58 of file object-factory.cc.

References m_tid.

Referenced by ns3::MobilityHelper::GetMobilityModelType(), and ns3::MobilityHelper::Install().

void ns3::ObjectFactory::Set ( const AttributeList list  ) 

Definition at line 52 of file object-factory.cc.

References m_parameters.

void ns3::ObjectFactory::Set ( std::string  name,
const AttributeValue value 
)
void ns3::ObjectFactory::SetTypeId ( std::string  tid  ) 
Parameters:
tid the TypeId of the object to instantiate.

Definition at line 32 of file object-factory.cc.

void ns3::ObjectFactory::SetTypeId ( const char *  tid  ) 
Parameters:
tid the TypeId of the object to instantiate.

Definition at line 37 of file object-factory.cc.

void ns3::ObjectFactory::SetTypeId ( TypeId  tid  ) 

Friends And Related Function Documentation

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

Member Data Documentation

Definition at line 89 of file object-factory.h.

Referenced by Create(), and Set().

Definition at line 88 of file object-factory.h.

Referenced by Create(), GetTypeId(), and SetTypeId().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:10:21 2009 for NS-3 by  doxygen 1.6.3