172 explicit TypeId(
const std::string& name);
324 template <
typename T>
362 template <
typename T>
393 const std::string& supportMsg =
"");
433 const std::string& supportMsg =
"");
460 std::string callback,
462 const std::string& supportMsg =
"");
479 const std::string& name);
495 bool permissive =
false)
const;
542 void SetUid(uint16_t uid);
575 explicit TypeId(uint16_t tid);
ns3::MakeAccessorHelper declarations and template implementations.
Attribute helper (ATTRIBUTE_ )macros definition.
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
Declaration of the various callback functions.
Hold a value for an Attribute.
Anchor the ns-3 type and attribute system.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
bool IsChildOf(TypeId other) const
Check if this TypeId is a child of another.
friend bool operator!=(TypeId a, TypeId b)
Comparison operator.
std::size_t GetTraceSourceN() const
Get the number of Trace sources.
bool SetAttributeInitialValue(std::size_t i, Ptr< const AttributeValue > initialValue)
Set the initial value of an Attribute.
static TypeId LookupByName(std::string name)
Get a TypeId by name.
bool HasParent() const
Check if this TypeId has a parent.
TypeId SetSize(std::size_t size)
Set the size of this type.
hash_t GetHash() const
Get the hash.
TypeId AddTraceSource(std::string name, std::string help, Ptr< const TraceSourceAccessor > accessor, std::string callback, SupportLevel supportLevel=SUPPORTED, const std::string &supportMsg="")
Record a new TraceSource.
bool MustHideFromDocumentation() const
Check if this TypeId should not be listed in documentation.
TypeId AddDeprecatedName(const std::string &name)
Add an deprecated name for a TypeId.
AttributeFlag
Flags describing when a given attribute can be read or written.
@ ATTR_GET
The attribute can be read.
@ ATTR_SGC
The attribute can be read, and written at any time.
@ ATTR_SET
The attribute can be written.
@ ATTR_CONSTRUCT
The attribute can be written at construction-time.
static bool LookupByHashFailSafe(hash_t hash, TypeId *tid)
Get a TypeId by hash.
TypeId::TraceSourceInformation GetTraceSource(std::size_t i) const
Get the trace source by index.
std::string GetGroupName() const
Get the group name.
TypeId HideFromDocumentation()
Hide this TypeId from documentation.
Callback< ObjectBase * > GetConstructor() const
Get the constructor callback.
static uint16_t GetRegisteredN()
Get the number of registered TypeIds.
std::string GetAttributeFullName(std::size_t i) const
Get the Attribute name by index.
bool HasConstructor() const
Check if this TypeId has a constructor.
std::size_t GetAttributeN() const
Get the number of attributes.
TypeId GetParent() const
Get the parent of this TypeId.
TypeId AddConstructor()
Record in this TypeId the fact that the default constructor is accessible.
void SetUid(uint16_t uid)
Set the internal id of this TypeId.
uint16_t m_tid
The TypeId value.
TypeId SetGroupName(std::string groupName)
Set the group name.
static TypeId LookupByHash(hash_t hash)
Get a TypeId by hash.
static TypeId GetRegistered(uint16_t i)
Get a TypeId by index.
friend bool operator==(TypeId a, TypeId b)
Comparison operator.
std::size_t GetSize() const
Get the size of this object.
Ptr< const TraceSourceAccessor > LookupTraceSourceByName(std::string name) const
Find a TraceSource by name.
TypeId & operator=(const TypeId &o)
Assignment.
friend bool operator<(TypeId a, TypeId b)
Comparison operator.
uint32_t hash_t
Type of hash values.
TypeId()
Default constructor.
TypeId::AttributeInformation GetAttribute(std::size_t i) const
Get Attribute information by index.
uint16_t GetUid() const
Get the internal id of this TypeId.
static bool LookupByNameFailSafe(std::string name, TypeId *tid)
Get a TypeId by name.
bool LookupAttributeByName(std::string name, AttributeInformation *info, bool permissive=false) const
Find an Attribute by name, retrieving the associated AttributeInformation.
SupportLevel
The level of support or deprecation for attributes or trace sources.
@ SUPPORTED
Attribute or trace source is currently used.
@ OBSOLETE
Attribute or trace source is not used anymore; simulation fails.
@ DEPRECATED
Attribute or trace source is deprecated; user is warned.
TypeId AddAttribute(std::string name, std::string help, const AttributeValue &initialValue, Ptr< const AttributeAccessor > accessor, Ptr< const AttributeChecker > checker, SupportLevel supportLevel=SUPPORTED, const std::string &supportMsg="")
Record in this TypeId the fact that a new attribute exists.
static std::tuple< bool, TypeId, AttributeInformation > FindAttribute(const TypeId &tid, const std::string &name)
Find an attribute by name in the inheritance tree for a given TypeId.
std::string GetName() const
Get the name.
TypeId SetParent()
Set the parent TypeId.
void DoAddConstructor(Callback< ObjectBase * > callback)
Implementation for AddConstructor().
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
ns3::Hasher, ns3::Hash32() and ns3::Hash64() function declarations.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator!=(Callback< R, Args... > a, Callback< R, Args... > b)
Inequality test.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
bool operator==(const EventId &a, const EventId &b)
std::ostream & operator<<(std::ostream &os, const Angles &a)
std::istream & operator>>(std::istream &is, Angles &a)
bool operator<(const EventId &a, const EventId &b)
ns3::TraceSourceAccessor and ns3::MakeTraceSourceAccessor declarations.