add comment about NS_OBJECT_ENSURE_REGISTERED() macro to the manual

This commit is contained in:
Tom Henderson
2009-05-29 13:33:20 -07:00
parent bf0c6fa9db
commit 017a9d1a79

View File

@@ -207,6 +207,8 @@ and some type of global default value.
In the ns-3 attribute system, these value definitions and accessor
functions are moved into the TypeId class; e.g.:
@verbatim
NS_OBJECT_ENSURE_REGISTERED (DropTailQueue);
TypeId DropTailQueue::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::DropTailQueue")
@@ -239,6 +241,11 @@ strings such as "MaxPackets" and TypeId strings. In the next
section, we will provide an example script that shows how users
may manipulate these values.
Note that initialization of the attribute relies on the macro
NS_OBJECT_ENSURE_REGISTERED (DropTailQueue) being called; if you leave
this out of your new class implementation, your attributes will not be
initialized corretly.
@subsection Basic usage
Let's look at how a user script might access these values.