I didnt know this was possible to do in C++, until I saw it. AddAttribute(),AddTraceSource(),etc are member functions of the class TypeId.
TypeId
Sender::GetTypeId (void)
{
static TypeId tid = TypeId ("Sender")
.SetParent<Application> () /*Member function of TypeId*/
.AddConstructor<Sender> ()
.AddAttribute ("PacketSize")
.AddAttribute ("Destination")
.AddTraceSource ("Tx")
;
return tid;
}
I never knew we could do this in C++. Could someone please throw more light on this topic (calling multiple member functions during object creation)? I know we can do this in scripting. But in c++? The file had an extension *.cc. Sorry if my question is naive, and it turns out I missed out on reading a few chapters in C++?!