Код: Выделить всё
class Node : public Object
{
public:
static TypeId GetTypeId (void);
< /code>
И его определение - < /p>
TypeId
Node::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::Node")
.SetParent ()
.SetGroupName ("Network")
.AddConstructor ()
.AddAttribute ("DeviceList",
"The list of devices associated to this Node.",
ObjectVectorValue (),
MakeObjectVectorAccessor (&Node::m_devices),
MakeObjectVectorChecker ())
.AddAttribute ("ApplicationList",
"The list of applications associated to this Node.",
ObjectVectorValue (),
MakeObjectVectorAccessor (&Node::m_applications),
MakeObjectVectorChecker ())
.AddAttribute ("Id",
"The id (unique integer) of this Node.",
TypeId::ATTR_GET, // allow only getting it.
UintegerValue (0),
MakeUintegerAccessor (&Node::m_id),
MakeUintegerChecker ())
;
return tid;
}
< /code>
Мой вопрос относится к этому: < /p>
static TypeId tid = TypeId ("ns3::Node")
.SetParent ()
Код: Выделить всё
.SetParent ()
.SetGroupName ("Network")
.AddConstructor ()
Подробнее здесь: https://stackoverflow.com/questions/578 ... tanding-it
Мобильная версия