[Ns-bugs] [Bug 284] cannot use config paths to get a handle on an object

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Tue Aug 12 08:51:38 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=284





------- Comment #4 from mathieu.lacage at sophia.inria.fr  2008-08-12 11:51 -------
(In reply to comment #3)
> It seems to me that there are four types of things the config strings can
> specify: trace sources, nodes, devices, and things aggregated to a node (I feel
> like I'm forgetting some other use of these though...).  In the specific cases

yes. There are many more objects which can be accessed through the config API.
Basically, anything which derives from Object.

> of nodes or devices, it might be nice to have different APIs that return a more
> specific container:
> 
> namespace Config {
> 
> NodeContainer LookupMatchingNodes (std::string path);
> NetDeviceContainer LookupMatchingNetDevices (std::string path);
> std::vector<Ptr<Object> > LookupMatchingObjects (std::string path);
> 
> }
> 
> And I can't think of why anyone would want to directly get a handle to a
> TracedValue or TracedCallback, so perhaps this should be disallowed?

There is no need to disallow it: it is simply impossible because these are not
subclasses of the Object base class so, they cannot be returned in an array of
Ptr<Object>.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list