a unique identifier for an interface. More...
#include <type-id.h>
Classes | |
struct | AttributeInfo |
store together a set of attribute properties. More... | |
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 |
std::string | GetAttributeName (uint32_t i) const |
std::string | GetAttributeHelp (uint32_t i) const |
std::string | GetAttributeFullName (uint32_t i) const |
Ptr< const AttributeValue > | GetAttributeInitialValue (uint32_t i) const |
uint32_t | GetAttributeFlags (uint32_t i) const |
Ptr< const AttributeChecker > | GetAttributeChecker (uint32_t i) const |
Ptr< const AttributeAccessor > | GetAttributeAccessor (uint32_t i) const |
Callback< ObjectBase * > | GetConstructor (void) const |
bool | MustHideFromDocumentation (void) const |
uint32_t | GetTraceSourceN (void) const |
std::string | GetTraceSourceName (uint32_t i) const |
std::string | GetTraceSourceHelp (uint32_t i) const |
Ptr< const TraceSourceAccessor > | GetTraceSourceAccessor (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) |
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 AttributeInfo *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) |
static bool | LookupAttributeByFullName (std::string fullName, struct AttributeInfo *info) |
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. |
Ptr<const AttributeAccessor> ns3::TypeId::GetAttributeAccessor | ( | uint32_t | i | ) | const |
i | index into attribute array. |
Ptr<const AttributeChecker> ns3::TypeId::GetAttributeChecker | ( | uint32_t | i | ) | const |
i | index into attribute array. |
uint32_t ns3::TypeId::GetAttributeFlags | ( | uint32_t | i | ) | const |
i | index into attribute array. |
std::string ns3::TypeId::GetAttributeFullName | ( | uint32_t | i | ) | const |
i | index into attribute array |
std::string ns3::TypeId::GetAttributeHelp | ( | uint32_t | i | ) | const |
i | index into attribute array. |
Ptr<const AttributeValue> ns3::TypeId::GetAttributeInitialValue | ( | uint32_t | i | ) | const |
i | index into attribute array. |
uint32_t ns3::TypeId::GetAttributeN | ( | void | ) | const |
std::string ns3::TypeId::GetAttributeName | ( | uint32_t | i | ) | const |
i | index into attribute array |
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] |
Ptr<const TraceSourceAccessor> ns3::TypeId::GetTraceSourceAccessor | ( | uint32_t | i | ) | const |
i | index into trace source array. |
std::string ns3::TypeId::GetTraceSourceHelp | ( | uint32_t | i | ) | const |
i | index into trace source array. |
uint32_t ns3::TypeId::GetTraceSourceN | ( | void | ) | const |
std::string ns3::TypeId::GetTraceSourceName | ( | uint32_t | i | ) | const |
i | index into trace source array. |
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 |
static bool ns3::TypeId::LookupAttributeByFullName | ( | std::string | fullName, | |
struct AttributeInfo * | info | |||
) | [static] |
fullName | the full name of the requested attribute | |
info | a pointer to the TypeId::AttributeInfo data structure where the result value of this method will be stored. |
bool ns3::TypeId::LookupAttributeByName | ( | std::string | name, | |
struct AttributeInfo * | info | |||
) | const |
name | the name of the requested attribute | |
info | a pointer to the TypeId::AttributeInfo 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 |
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.