Discussion:
[omniORB] use of NameService iterator
Amit Kumar
2009-10-21 21:55:27 UTC
Permalink
Hello All,



I am using bind_new_context() to create a Naming graph.



//

child_context = nc->bind_new_context(name); // both child_context and nc are
of type CosNaming::NaminContext_var

//



Now, I am looking to get the list of all bindings under the context
Child_context using the iterator available in NameService. But I am stuck at
this problem mentioned in the book "Advanced Corba programming with C++"



++++++++++++++++

A binding list contains only names for the bindings immediately contained in
the context;

it does not contain bindings in subcontexts.

++++++++++++++++



I am not even able to resolve the child_context using the initial context nc
without resolving the individual bindings under child_context.

Can anyone suggest the solution.



Regards,

Amit





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20091021/b08aeb37/attachment.htm
Duncan Grisby
2009-10-23 17:05:53 UTC
Permalink
On Wed, 2009-10-21 at 21:26 +0530, Amit Kumar wrote:

[...]
Post by Amit Kumar
Now, I am looking to get the list of all bindings under the context
Child_context using the iterator available in NameService. But I am
stuck at this problem mentioned in the book ?Advanced Corba
programming with C++?
[...]
Post by Amit Kumar
A binding list contains only names for the bindings immediately
contained in the context;
it does not contain bindings in subcontexts.
[...]
Post by Amit Kumar
I am not even able to resolve the child_context using the initial
context nc without resolving the individual bindings under
child_context.
I don't understand what the problem is. H&V are right that binding lists
do not recursively descend into child contexts, but there's nothing
stopping you writing code that does so. Maybe you will get some hints by
reading the code of namclt, in src/appl/utils/nameclt/nameclt.cc.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Amit Kumar
2009-10-23 17:26:45 UTC
Permalink
Hi Duncan,

Thanks for the response. I am able to iterate through the child contexts as well now.

Regards,
Amit

-----Original Message-----
From: Duncan Grisby [mailto:***@grisby.org]
Sent: Friday, October 23, 2009 4:36 PM
To: Amit Kumar
Cc: omniorb-***@omniorb-support.com
Subject: Re: [omniORB] use of NameService iterator

On Wed, 2009-10-21 at 21:26 +0530, Amit Kumar wrote:

[...]
Post by Amit Kumar
Now, I am looking to get the list of all bindings under the context
Child_context using the iterator available in NameService. But I am
stuck at this problem mentioned in the book ?Advanced Corba
programming with C++?
[...]
Post by Amit Kumar
A binding list contains only names for the bindings immediately
contained in the context;
it does not contain bindings in subcontexts.
[...]
Post by Amit Kumar
I am not even able to resolve the child_context using the initial
context nc without resolving the individual bindings under
child_context.
I don't understand what the problem is. H&V are right that binding lists
do not recursively descend into child contexts, but there's nothing
stopping you writing code that does so. Maybe you will get some hints by
reading the code of namclt, in src/appl/utils/nameclt/nameclt.cc.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...