[Ns-bugs] [Bug 518] Constructing objects from a TypeId seems complex
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Mon Mar 9 12:06:31 PDT 2009
http://www.nsnam.org/bugzilla/show_bug.cgi?id=518
--- Comment #4 from Gustavo J. A. M. Carneiro <gjcarneiro at gmail.com> 2009-03-09 15:06:30 EDT ---
(In reply to comment #3)
> (In reply to comment #2)
> > I did have the feeling I was missing something... :-)
> >
> > Still, it would be nice to construct an object directly from a TypeId. It's
> > how e.g. Python works: you call the type and as result you get an instance of
> > that type. It's rather uncomplicated.
>
> The main reason why this is not so is that a TypeId can represent anything
> which derives from ObjectBase while ObjectFactory can only create objects which
> derive from Object.
I don't see how one thing invalidates the other:
Ptr<T> TypeId::operator() const;
This is type agnostic; can build anything that is reference countable ;-)
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs
mailing list