NS-3
|
a unique identifier for an interface. More...
#include <type-id.h>
Classes | |
struct | AttributeInformation |
struct | TraceSourceInformation |
Public Types | |
enum | AttributeFlag { ATTR_GET = 1<<0, ATTR_SET = 1<<1, ATTR_CONSTRUCT = 1<<2, ATTR_SGC = ATTR_GET | ATTR_SET | ATTR_CONSTRUCT } |
Public Member Functions | |
TypeId (const char *name) | |
TypeId | GetParent (void) const |
bool | HasParent (void) const |
bool | IsChildOf (TypeId other) const |
std::string | GetGroupName (void) const |
std::string | GetName (void) const |
bool | HasConstructor (void) const |
uint32_t | GetAttributeN (void) const |
struct TypeId::AttributeInformation | GetAttribute (uint32_t i) const |
std::string | GetAttributeFullName (uint32_t i) const |
Callback< ObjectBase * > | GetConstructor (void) const |
bool | MustHideFromDocumentation (void) const |
uint32_t | GetTraceSourceN (void) const |
struct TypeId::TraceSourceInformation | GetTraceSource (uint32_t i) const |
TypeId | SetParent (TypeId tid) |
template<typename T > | |
TypeId | SetParent (void) |
TypeId | SetGroupName (std::string groupName) |
template<typename T > | |
TypeId | AddConstructor (void) |
TypeId | AddAttribute (std::string name, std::string help, const AttributeValue &initialValue, Ptr< const AttributeAccessor > accessor, Ptr< const AttributeChecker > checker) |
bool | SetAttributeInitialValue (uint32_t i, Ptr< const AttributeValue > initialValue) |
TypeId | AddAttribute (std::string name, std::string help, uint32_t flags, const AttributeValue &initialValue, Ptr< const AttributeAccessor > accessor, Ptr< const AttributeChecker > checker) |
TypeId | AddTraceSource (std::string name, std::string help, Ptr< const TraceSourceAccessor > accessor) |
TypeId | HideFromDocumentation (void) |
bool | LookupAttributeByName (std::string name, struct AttributeInformation *info) const |
Ptr< const TraceSourceAccessor > | LookupTraceSourceByName (std::string name) const |
uint16_t | GetUid (void) const |
void | SetUid (uint16_t tid) |
TypeId (const TypeId &o) | |
TypeId & | operator= (const TypeId &o) |
Static Public Member Functions | |
static TypeId | LookupByName (std::string name) |
static bool | LookupByNameFailSafe (std::string name, TypeId *tid) |
static uint32_t | GetRegisteredN (void) |
static TypeId | GetRegistered (uint32_t i) |
Friends | |
class | AttributeList |
bool | operator== (TypeId a, TypeId b) |
bool | operator!= (TypeId a, TypeId b) |
bool | operator< (TypeId a, TypeId b) |
a unique identifier for an interface.
This class records a lot of meta-information about a subclass of the Object base class:
ns3::TypeId::TypeId | ( | const char * | name | ) | [explicit] |
name | the name of the interface to construct. |
No two instances can share the same name. The name is expected to be the full c++ typename of associated c++ object.
TypeId ns3::TypeId::AddAttribute | ( | std::string | name, |
std::string | help, | ||
const AttributeValue & | initialValue, | ||
Ptr< const AttributeAccessor > | accessor, | ||
Ptr< const AttributeChecker > | checker | ||
) |
name | the name of the new attribute |
help | some help text which describes the purpose of this attribute. |
initialValue | the initial value for this attribute. |
accessor | an instance of the associated AttributeAccessor subclass. |
checker | an instance of the associated AttributeChecker subclass. |
Record in this TypeId the fact that a new attribute exists.
TypeId ns3::TypeId::AddAttribute | ( | std::string | name, |
std::string | help, | ||
uint32_t | flags, | ||
const AttributeValue & | initialValue, | ||
Ptr< const AttributeAccessor > | accessor, | ||
Ptr< const AttributeChecker > | checker | ||
) |
name | the name of the new attribute |
help | some help text which describes the purpose of this attribute |
flags | flags which describe how this attribute can be read and/or written. |
initialValue | the initial value for this attribute. |
accessor | an instance of the associated AttributeAccessor subclass. |
checker | an instance of the associated AttributeChecker subclass. |
Record in this TypeId the fact that a new attribute exists.
TypeId ns3::TypeId::AddConstructor | ( | void | ) |
TypeId ns3::TypeId::AddTraceSource | ( | std::string | name, |
std::string | help, | ||
Ptr< const TraceSourceAccessor > | accessor | ||
) |
name | the name of the new trace source |
help | some help text which describes the purpose of this trace source. |
accessor | a pointer to a TraceSourceAccessor which can be used to connect/disconnect sinks to this trace source. |
struct TypeId::AttributeInformation ns3::TypeId::GetAttribute | ( | uint32_t | i | ) | const [read] |
i | index into attribute array |
std::string ns3::TypeId::GetAttributeFullName | ( | uint32_t | i | ) | const |
i | index into attribute array |
uint32_t ns3::TypeId::GetAttributeN | ( | void | ) | const |
Callback<ObjectBase *> ns3::TypeId::GetConstructor | ( | void | ) | const |
std::string ns3::TypeId::GetGroupName | ( | void | ) | const |
std::string ns3::TypeId::GetName | ( | void | ) | const |
TypeId ns3::TypeId::GetParent | ( | void | ) | const |
static TypeId ns3::TypeId::GetRegistered | ( | uint32_t | i | ) | [static] |
i | index |
static uint32_t ns3::TypeId::GetRegisteredN | ( | void | ) | [static] |
struct TypeId::TraceSourceInformation ns3::TypeId::GetTraceSource | ( | uint32_t | i | ) | const [read] |
i | index into trace source array. |
uint32_t ns3::TypeId::GetTraceSourceN | ( | void | ) | const |
uint16_t ns3::TypeId::GetUid | ( | void | ) | const |
This is really an internal method which users are not expected to use.
bool ns3::TypeId::HasConstructor | ( | void | ) | const |
bool ns3::TypeId::IsChildOf | ( | TypeId | other | ) | const |
bool ns3::TypeId::LookupAttributeByName | ( | std::string | name, |
struct AttributeInformation * | info | ||
) | const |
name | the name of the requested attribute |
info | a pointer to the TypeId::AttributeInformation data structure where the result value of this method will be stored. |
static TypeId ns3::TypeId::LookupByName | ( | std::string | name | ) | [static] |
static bool ns3::TypeId::LookupByNameFailSafe | ( | std::string | name, |
TypeId * | tid | ||
) | [static] |
Ptr<const TraceSourceAccessor> ns3::TypeId::LookupTraceSourceByName | ( | std::string | name | ) | const |
name | the name of the requested trace source |
If no matching trace source is found, this method returns zero.
bool ns3::TypeId::MustHideFromDocumentation | ( | void | ) | const |
bool ns3::TypeId::SetAttributeInitialValue | ( | uint32_t | i, |
Ptr< const AttributeValue > | initialValue | ||
) |
i | the attribute to manipulate |
initialValue | the new initial value to use for this attribute. |
TypeId ns3::TypeId::SetGroupName | ( | std::string | groupName | ) |
TypeId ns3::TypeId::SetParent | ( | void | ) |
void ns3::TypeId::SetUid | ( | uint16_t | tid | ) |
tid | the internal integer which uniquely identifies this TypeId. |
This method is even more internal than TypeId::GetUid. Use at your own risk and don't be surprised that it eats raw babies on full-moon nights.