summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-12-21 18:20:32 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-12-21 18:20:32 +0000
commit7ec2da4c782dce0486cb763b5f23c2b73636054c (patch)
treef0de331ba9d12a77ac3921c9b59e332f215a38ac /TAO
parent050b3c596d140de0c3236ce7cae927a5864c969b (diff)
downloadATCD-7ec2da4c782dce0486cb763b5f23c2b73636054c.tar.gz
ChangeLogTag:Tue Dec 21 08:02:43 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog-99c46
-rw-r--r--TAO/docs/Smart_Proxies.html98
-rw-r--r--TAO/docs/index.html2
-rw-r--r--TAO/docs/interceptors.html25
-rw-r--r--TAO/docs/minimumTAO.html41
-rw-r--r--TAO/docs/pluggable_protocols/index.html116
-rw-r--r--TAO/examples/Simple/time/Time_Client.java2
-rw-r--r--TAO/utils/NamingViewer/AddNameServerDlg.cpp51
-rw-r--r--TAO/utils/NamingViewer/AddNameServerDlg.h48
-rw-r--r--TAO/utils/NamingViewer/BindDialog.cpp103
-rw-r--r--TAO/utils/NamingViewer/BindDialog.h58
-rw-r--r--TAO/utils/NamingViewer/BindNewContext.cpp54
-rw-r--r--TAO/utils/NamingViewer/BindNewContext.h50
-rw-r--r--TAO/utils/NamingViewer/NamingObject.cpp49
-rw-r--r--TAO/utils/NamingViewer/NamingObject.h36
-rw-r--r--TAO/utils/NamingViewer/NamingTreeCtrl.cpp505
-rw-r--r--TAO/utils/NamingViewer/NamingTreeCtrl.h75
-rw-r--r--TAO/utils/NamingViewer/NamingViewer.cpp84
-rw-r--r--TAO/utils/NamingViewer/NamingViewer.dsp204
-rw-r--r--TAO/utils/NamingViewer/NamingViewer.dsw29
-rw-r--r--TAO/utils/NamingViewer/NamingViewer.h50
-rw-r--r--TAO/utils/NamingViewer/NamingViewer.rc355
-rw-r--r--TAO/utils/NamingViewer/NamingViewerDlg.cpp262
-rw-r--r--TAO/utils/NamingViewer/NamingViewerDlg.h61
-rw-r--r--TAO/utils/NamingViewer/README74
-rw-r--r--TAO/utils/NamingViewer/SelectNSDialog.cpp137
-rw-r--r--TAO/utils/NamingViewer/SelectNSDialog.h58
-rw-r--r--TAO/utils/NamingViewer/StdAfx.cpp9
-rw-r--r--TAO/utils/NamingViewer/StdAfx.h29
-rw-r--r--TAO/utils/NamingViewer/ViewIORDialog.cpp156
-rw-r--r--TAO/utils/NamingViewer/ViewIORDialog.h54
-rw-r--r--TAO/utils/NamingViewer/res/NamingViewer.icobin0 -> 1078 bytes
-rw-r--r--TAO/utils/NamingViewer/res/NamingViewer.rc213
-rw-r--r--TAO/utils/NamingViewer/resource.h52
-rw-r--r--TAO/utils/README5
35 files changed, 2872 insertions, 119 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 5cf5f482a0d..f67c1f966b8 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,15 @@
+Mon Dec 20 12:59:59 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * examples/Simple/time/Time_Client.java: Changed the name of the
+ class from TimeClient to Time_Client to make Java IDL 1.2 happy.
+ Thanks to Andrey Nechypurenko <andreynech@yahoo.com> for
+ reporting this.
+
+ * utils/NamingViewer: Added a new utility that contains an
+ MFC-based CosNaming viewer that that allows users to manipulate
+ a Naming Context visually. Thanks to Chris Hafey
+ <chris@stentorsoft.com> for contributing this.
+
Tue Dec 21 11:34:45 1999 bala <bala@cs.wustl.edu>
* TAO version 1.0.10 released.
@@ -61,26 +73,25 @@ Mon Dec 20 18:25:34 1999 Darrell Brunsch <brunsch@cs.wustl.edu>
Mon Dec 20 14:22:57 1999 Balachandran Natarajan <bala@cs.wustl.edu>
- * orbsvcs/orbsvcs/Notify/Notify_Filter_i.cpp:
- * orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.cpp:
- * orbsvcs/orbsvcs/Notify/Notify_FilterFactory_i.cpp:
- * orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.cpp:
- * orbsvcs/orbsvcs/Notify/Notify_StructuredProxyPushConsumer_i.cpp:
- * orbsvcs/orbsvcs/Notify/Notify_StructuredProxyPushSupplier_i.cpp:
- * orbsvcs/orbsvcs/Notify/Notify_StructuredPushConsumer.cpp:
- * orbsvcs/orbsvcs/Notify/Notify_StructuredPushSupplier.cpp:
- * orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp: Fixed
- warnings on SunOS_EGCS.
-
+ * orbsvcs/orbsvcs/Notify/Notify_Filter_i.cpp:
+ * orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.cpp:
+ * orbsvcs/orbsvcs/Notify/Notify_FilterFactory_i.cpp:
+ * orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.cpp:
+ * orbsvcs/orbsvcs/Notify/Notify_StructuredProxyPushConsumer_i.cpp:
+ * orbsvcs/orbsvcs/Notify/Notify_StructuredProxyPushSupplier_i.cpp:
+ * orbsvcs/orbsvcs/Notify/Notify_StructuredPushConsumer.cpp:
+ * orbsvcs/orbsvcs/Notify/Notify_StructuredPushSupplier.cpp:
+ * orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp: Fixed
+ warnings on SunOS_EGCS.
Mon Dec 20 13:52:24 1999 Balachandran Natarajan <bala@cs.wustl.edu>
- * tao/Tagged_Components.i (components):
- * tao/Tagged_Components.h :Added a method components () that would
- return read/write access to the underlying
- IOP::MultipleComponentProfile in the TAO_Tagged_Components
- class. Thanks to Chris Hafey <chris@sternsoft.com> for
- suggesting this.
+ * tao/Tagged_Components.i (components):
+ * tao/Tagged_Components.h :Added a method components () that would
+ return read/write access to the underlying
+ IOP::MultipleComponentProfile in the TAO_Tagged_Components
+ class. Thanks to Chris Hafey <chris@sternsoft.com> for
+ suggesting this.
Mon Dec 20 12:21:20 1999 Balachandran Natarajan <bala@cs.wustl.edu>
@@ -136,7 +147,6 @@ Mon Dec 20 11:10:07 1999 Balachandran Natarajan <bala@cs.wustl.edu>
* orbsvcs/orbsvcs/Trader/Interpreter_Utils.cpp: Changed some
template instantiations.
-
Mon Dec 20 10:17:01 1999 Balachandran Natarajan <bala@cs.wustl.edu>
* orbsvcs/orbsvcs/Trader/Trader.cpp: Removed some template
diff --git a/TAO/docs/Smart_Proxies.html b/TAO/docs/Smart_Proxies.html
index 2324124556c..ed7368aa927 100644
--- a/TAO/docs/Smart_Proxies.html
+++ b/TAO/docs/Smart_Proxies.html
@@ -1,26 +1,15 @@
<!-- $Id$-->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<TITLE>Smart Proxies</TITLE>
<BODY>
-<CENTER><H1>Smart Proxies</H1></CENTER>
<BODY text = "#000000"
link="#000fff"
vlink="#ff0f0f"
bgcolor="#ffffff">
-<h3><a name="toc">Table of Contents</a></h3>
-<ul>
- <li><a href="#Introduction">Introduction</a>
- <li><a href="#Design Issues">Design Issues</a>
- <li><a href="#Design Overview">Design Overview</a>
- <li><a href="#Implementation Issues">Implementation Issues</a>
- <li><a href="#Acknowledgements">Acknowledgements</a>
- <li><a href="#ref">References</a>
-</ul>
-
-<h2><a name="Introduction">Introduction</a></h2>
+<Hr><P>
+<H3>Smart Proxies</H3>
<P>Smart Proxies (or Smart Stubs) are basically user-defined proxy
classes.</p>
@@ -31,15 +20,27 @@ invocations are to be made by the client, i.e. it has the same methods
as the targeting interface. A proxy packadges the request which gets
marshalled and sent to the target object.</p>
+<Hr><P>
+<h3><a name="toc">Table of Contents</a></h3>
+<ul>
+ <li><a href="#Examples">Examples</a>
+ <li><a href="#Design Issues">Design Issues</a>
+ <li><a href="#Design Overview">Design Overview</a>
+ <li><a href="#Implementation Issues">Implementation Issues</a>
+ <li><a href="#Acknowledgements">Acknowledgements</a>
+ <li><a href="#ref">References</a>
+</ul>
+
+<Hr><P>
+<h3><a name="Examples">Examples</a></h3>
+
<P>The user may wish to manually change the proxy code for the following
reasons:
-<P>
-<h3><a name="Examples">Examples</a></h3>
-<P>1) Cache information about the remote object locally to save the
-expense of going across the wire for every request.
+<UL> <LI> Cache information about the remote object locally to save
+the expense of going across the wire for every request. <P>
-<P>2) Batch updates/accesses to the remote object.
+<LI> Batch updates/accesses to the remote object.
<p>For instance:<br>
Consider a remote Database which has an API which can update either a
single record or 10 records at one shot. To leverage performance, one
@@ -47,7 +48,7 @@ would want to use this method. So a user can use the smart proxy to
implement the 10 record update method by caching single record update
requests.</p>
-<P> It is not certain whether this usecase might not induce extra
+<P>It is not certain whether this usecase might not induce extra
overhead and whether the proxy can be smart enough to deduce the use
of this kind of batch processing. Also, this scheme wont work for
two-way calls.The "cached-oneways" feature might make more sense in
@@ -55,7 +56,7 @@ this scenario. Thus the application programmer will have to determine
how this caching optimisation changes the semantics of the original
interface.</p>
-<P>3) The client can make a single request which results in a sequence
+<LI> The client can make a single request which results in a sequence
of invocations to one or possibly more objects.
<p> For instance:<br>
@@ -64,18 +65,22 @@ this should be possible) which do validation of the request to be
made. The remote call could result in another call wherein the
validation occurs before it is shoved over the wire.</p>
-<P>4) Quality of Service features like load-balancing can be considered
+<LI> Quality of Service features like load-balancing can be considered
by the smart proxy before making the invocation on the appropriate
target object.</p>
+</UL>
-<h2><a name="Design Issues">Design Issues</a></h2>
+<Hr><P>
+<h3><a name="Design Issues">Design Issues</a></h3>
-<P>1) How will the smart proxy be created?
-<P>2) Who will create the smart proxy?
-<P>3) It has to be done before the invocations on the target object are
+<UL>
+<LI> How will the smart proxy be created?
+<LI> Who will create the smart proxy?
+<LI> It has to be done before the invocations on the target object are
done, so when will it get created?
-<P>4) What about collocation? Will those stubs fall under this category?</p>
-<p>5) Will smart proxies work for collocated object references?</p>
+<LI> What about collocation? Will those stubs fall under this category?
+<LI> Will smart proxies work for collocated object references?
+</UL>
<h3>Design Needs and discussion points</h3>
@@ -100,34 +105,39 @@ collcated stubs.</p>
<P>Classses to be generated by TAO_IDL in addition to the Default
Stub:</p>
-<P>1. TAO_Proxy_Factory_Adapter
+<UL>
+<LI> <CODE>TAO_Proxy_Factory_Adapter</CODE>
<p>The singleton which has the different proxies (stubs) factories
registered with it.</p>
-<P>2.TAO_Test_Default_Proxy_Factory
+<LI> <CODE>TAO_Test_Default_Proxy_Factory</CODE>
<p>The factory which returns the proxy_ptr which is used in the
<code>unchecked_narow</code> method to create the appropriate proxy
object.
-<P>3. TAO_Smart_Proxy_Base
+<LI> <CODE>TAO_Smart_Proxy_Base</CODE>
<p>The smart proxy interface which makes it easier for the
user to simply implement only the methods he wishes to change and also
provides a <br>common interface to address remote as well as collocated
stubs.</p>
+</UL>
<P>Classes to be defined by the user:</p>
-<P>1. SmartFactory - inherits from TAO_Default_Proxy_Factory class.
+<UL>
+<LI> <CODE>SmartFactory</CODE> - inherits from TAO_Default_Proxy_Factory class.
<p>The factory which will create the smart proxy which the
user wants. Its necessary that an object of this class is created.</p>
-<P>2. SmartProxy - derivative of the TAO_Smart_Proxy_Base class.
+<LI> <CODE>SmartProxy</CODE> - derivative of the TAO_Smart_Proxy_Base class.
<p>The proxy which has the user desired extra functionality.</p>
<P>*Note: Names are as they are to make it easier to comprehend the
concept.</p>
+</UL>
-<h3>In more detail</h3>
+<Hr><P>
+<h3>Detailed Example</h3>
<pre>
//------------------------ Generated by TAO_IDL------------------------
@@ -320,33 +330,39 @@ interface_ptr _unchecked_narrow (CORBA::Object obj,
}
</pre>
-<h2><a name="Implementation Issues">Implementation Issues</a></h2>
+<Hr><P>
+<h3><a name="Implementation Issues">Implementation Issues</a></h3>
-<p> 1) Native exceptions? How are these to be handled?</p>
+<UL>
+<LI> Native exceptions? How are these to be handled?</p>
<p> This not an issue really because the actual method call is simply
to the application level which will catch it as the exception is
propogated upwards from the proxy level.</p>
-<p> 2) What if the user wants to have a smart proxy which inherits from
-many interfaces?</p>
+<LI> What if the user wants to have a smart proxy which inherits from
+many interfaces?
<p> First have different smart proxies which inherit from the
TAO_Smart_Proxy_Base (every default smart proxy is for an interface) and
then have a new smart proxy inheriting from the previously created
smart proxies. But remember: the SmartProxyFactory should create the
final smart proxy thru its create_proxy () method.
+</UL>
-<h2><a name="Acknowledgements">Acknowledgements</a></h2>
+<Hr><P>
+<h3><a name="Acknowledgements">Acknowledgements</a></h3>
<P><a href="mailto:nanbor@cs.wustl.edu">Nanbor Wang</a> and <a
href="mailto:schmidt@cs.wustl.edu">Dr.Schmidt</a> for their help in
-designing and discussing this feature.
+designing and discussing this feature. <P>
-<h2><a name="ref">References</a></h2>
+<Hr><P>
+<h3><a name="ref">References</a></h3>
<p> CORBA Distributed Objects using Orbix - Sean Baker </p>
<p> Visigenic Documentation </p>
-<p><h2>Last update:</h2></p>
+<Hr><P>
+<p><h3>Last Update</h3></3>
<p> Date: 21thSept99</p>
<p> By: <a href="mailto:kirthika@cs.wustl.edu">Kirthika Parameswaran</a></p>
diff --git a/TAO/docs/index.html b/TAO/docs/index.html
index 7aa2b77be70..df1c8db9946 100644
--- a/TAO/docs/index.html
+++ b/TAO/docs/index.html
@@ -30,7 +30,7 @@ HREF="http://www.omg.org/library/c2indx.html">CORBA</a> Documentation</h3>
<td><font SIZE="+1"><dl>
<dt><a HREF="INS.html">Interoperable Naming Service</a> </dt><P>
<dt><a HREF="implrepo/">Implementation Repository</a> </dt><P>
- <dt><a HREF="minimumTAO.html">Minimum TAO</a> </dt><P>
+ <dt><a HREF="minimumTAO.html">TAO Subsetting</a> </dt><P>
<dt><p><a href="../../docs/exceptions.html">Exception Handling</a></p>
<dt><a HREF="Tags.html">Tags and Magic Numbers</a> </dt><P>
<dt><a HREF="pluggable_protocols/index.html">Writing Pluggable Protocols</a> </dt><P>
diff --git a/TAO/docs/interceptors.html b/TAO/docs/interceptors.html
index 45c69950e7a..1e2935d99e6 100644
--- a/TAO/docs/interceptors.html
+++ b/TAO/docs/interceptors.html
@@ -1,7 +1,9 @@
<HTML>
<TITLE>Portable Interceptors</TITLE>
<BODY>
-<CENTER><H1>Portable Interceptors</H1></CENTER>
+
+<Hr><P>
+<H3>Portable Interceptors</H3>
<BODY text = "#000000"
link="#000fff"
@@ -18,6 +20,7 @@ once we have the new mechanism in place.</p>
<p>The revised interceptor implementation will be available shortly.</p>
+<Hr><P>
<h3><a name="toc">Table of Contents</a></h3>
<ul>
<li><a href="#context">Context</a>
@@ -27,6 +30,7 @@ once we have the new mechanism in place.</p>
<li><a href="#ref">References</a>
</ul>
+<Hr><P>
<h2><a name="context">Context</a></h2>
<p>Interceptors allow you to interpose other CORBA services to the ORB
@@ -43,8 +47,9 @@ Portable Interceptor</a>" specification which will remedy the problems
and allow application users to use interceptos from different venders
with their ORBs. </p>
-<h2><a name="implement">TAO's Implementation of "Portable
-Interceptors"</a></h2>
+<Hr><P>
+<h3><a name="implement">TAO's Implementation of "Portable
+Interceptors"</a></h3>
<p>TAO's portable interceptor implementation was developped before
even a joint submission was available. There were several proposed
@@ -60,8 +65,9 @@ finalized.</p>
proposed spec., this document provide some guidelines on how you can
revise your portable interceptors to work with the "standard." </p>
-<h2><a name="api">Guide for Transitting from TAO's Old "Portable"
-Interceptor APIs to the Standard Portable Interceptor APIs</a></h2>
+<Hr><P>
+<h3><a name="api">Guide for Transitting from TAO's Old "Portable"
+Interceptor APIs to the Standard Portable Interceptor APIs</a></h3>
<p>Please refer to the working draft for details on the proposed
Portable Interceptor interfaces.</p>
@@ -261,13 +267,15 @@ module PortableInterceptor
#pragma prefix ""
</pre>
-<h2><a name="status">Current Status</a></h2>
+<Hr><P>
+<h3><a name="status">Current Status</a></h3>
<ul>
<li>We will change the temporary interceptor implementation to
conform with the proposed spec. shortly.
</ul>
-<h2><a name="future">Future Works</a></h2>
+<Hr><P>
+<h2><a name="future">Future Work</a></h2>
<ol>
<li><p>There will only be request-level interceptors.</p></li>
@@ -276,7 +284,8 @@ module PortableInterceptor
<li><p>Add support for "standard" portable interceptors.</p></li>
</ol>
-<H3><a name="ref">References:</a></H3>
+<Hr><P>
+<H3><a name="ref">References</a></H3>
<UL>
<LI><a href="ftp://ftp.omg.org/pub/docs/orbos/99-10-01.pdf">
99-10-01</a> Portable Interceptors Working Draft -- Joint Revised
diff --git a/TAO/docs/minimumTAO.html b/TAO/docs/minimumTAO.html
index 8eca7208b10..66a65a3c243 100644
--- a/TAO/docs/minimumTAO.html
+++ b/TAO/docs/minimumTAO.html
@@ -44,31 +44,38 @@ ACE to support only those <a href =
"http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/ACE-subsets.html">components</a>
that are required by TAO. Secondly, we <a href =
"http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/TAO-INSTALL.html">configure</a>
-TAO to only support the components specified by the <em>minimumCORBA</em>
-specification. The following two tables show the footprint reduction
-achieved. Note that the IDL Compiler column refers to the code
-required to collaborate between the IDL compiler and the ORB, and not
-to the code for the IDL compiler itself.
-
+TAO to only support the components specified by the
+<em>minimumCORBA</em> specification. The following two tables show
+the footprint reduction achieved. Note that the IDL Compiler column
+refers to the code required to collaborate between the IDL compiler
+and the ORB, and not to the code for the IDL compiler itself.
<p>
<hr>
<p>
-<em>Note: All measurement are for ACE 5.0 and TAO 1.0 using
-egcs-2.91.60 on SunOS5.7<br>
-
-Make options used were:
+Note: All measurement are for ACE 5.0 and TAO 1.0 using egcs-2.91.60
+on SunOS5.7<P>
-<code> debug=0 optimize=1 static_libs_only=1 DEFFLAGS=-DACE_USE_RCSID=0 </code> <br>
+The <a
+href="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/ACE-INSTALL.html#flags">make
+flags</a> options used were: <P>
-The above make options translate into:
+<code> debug=0 optimize=1 static_libs_only=1 DEFFLAGS=-DACE_USE_RCSID=0 </code> <P>
-(a) No debugging,
-(b) Optimization is set to -O2,
-(c) Static ACE and TAO libraries, and
-(d) Use of RCS Ids is turned off. <br>
+These options translate into:<P>
+<UL>
+<LI> No debugging
+<LI> Optimization is set to -O2
+<LI> Static ACE and TAO libraries
+<LI> Use of RCS Ids is turned off
+</UL>
+<p>
-<p></em>
+To build a TAO static library, if shared libraries are the default,
+use <code>make static_libs_only=1</code> (make sure to do this for
+ACE, as well). If you're using recent versions of GNU GCC, you can
+use the <A HREF="../ACE-INSTALL.html#repo">-frepo</A> option, which
+typically reduces the footprint by another 25 percent. <P>
<p>
<hr>
diff --git a/TAO/docs/pluggable_protocols/index.html b/TAO/docs/pluggable_protocols/index.html
index 754157fd840..fad4561a3c4 100644
--- a/TAO/docs/pluggable_protocols/index.html
+++ b/TAO/docs/pluggable_protocols/index.html
@@ -20,8 +20,12 @@
<P>
<H1 ALIGN="CENTER">Implementing Pluggable Protocols for TAO</H1>
-<P ALIGN="CENTER"><STRONG>Fred Kuhns, Douglas C. Schmidt, Carlos
- O'Ryan, Ossama Othman, Bruce Trask</STRONG></P>
+<P ALIGN="CENTER"><STRONG>
+<A HREF="http://www.cs.wustl.edu/~fredk">Fred Kuhns</A>,
+<A HREF="http://www.eng.uci.edu/~schmidt/">Douglas C. Schmidt</A>,
+<A HREF="http://www.cs.wustl.edu/~coryan">Carlos O'Ryan</A>,
+<A HREF="http://www.cs.wustl.edu/~othman/">Ossama Othman</A>,
+and <A HREF="mailto:BTRASK@contactsystems.com">Bruce Trask</A></STRONG></P>
<P ALIGN="CENTER">
@@ -29,9 +33,35 @@ Center for Distributed Object Computing<BR>
Washington University at St.Louis
</P>
+<P><HR><P>
+<H3>Overview</H3><P>
+
+To be an effective platform for performance-sensitive real-time and
+embedded applications, off-the-shelf CORBA middleware must preserve
+the communication-layer quality of service (QoS) properties of
+applications end-to-end. However, the standard CORBA GIOP/IIOP
+interoperability protocols are not well suited for applications that
+cannot tolerate the message footprint size, latency, and jitter
+associated with general-purpose messaging and transport protocols. It
+is essential, therefore, to develop standard <EM>pluggable protocols
+frameworks</em> that allow custom messaging and transport protocols to
+be configured flexibly and used transparently by applications.
+This document explains how to develop pluggable protocols using TAO's
+pluggable protocols framework. <P>
+
+Here are some links that describe TAO's pluggable protocols framework,
+though not how to implement one: <BLOCKQUOTE>
+<A
+HREF="../releasenotes/index.html#pp">http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/releasenotes/index.html#pp</A><BR>
+
+<A HREF="http://www.cs.wustl.edu/~schmidt/PfHSN.ps.gz">http://www.cs.wustl.edu/~schmidt/PfHSN.ps.gz</A><BR>
+<A
+HREF="http://www.cs.wustl.edu/~schmidt/pluggable_protocols.ps.gz">http://www.cs.wustl.edu/~schmidt/pluggable_protocols.ps.gz</A>
+</BLOCKQUOTE>
+
<P>
-<BR><HR>
-<!-- Table of Contents -->
+<HR>
+<H3>Table of Contents</H3><P>
<UL>
<LI><A NAME="TOC_SECTION100" HREF="#SECTION100">Overview of Implementation of Pluggable Protocols for TAO</A>
<UL>
@@ -189,7 +219,8 @@ For example, ACE wraps the <I>socket</I> API to create an <TT>ACE_INET_Addr</TT>
protocol layer 4, aka <I>TP4</I>, should be implemented similarly. A TP4 implementation
could have an <TT>ACE_TP4_Addr</TT>, <TT>ACE_TP4_Acceptor</TT>, <TT>ACE_TP4_Connector</TT>
and an <TT>ACE_TP4_Stream</TT>. Any new implementation should retain the interface
-provided by the base <TT>IPC_SAP</TT> classes in ACE.</LI>
+provided by the base <TT>IPC_SAP</TT> classes in ACE.</LI> <P>
+
<LI>Once the above ACE <TT>IPC_SAP</TT> components have been implemented, creating
the necessary TAO pluggable protocol components should be fairly easy. In fact,
much of the code can be ``cut and pasted'' from existing TAO pluggable protocol
@@ -2631,34 +2662,33 @@ TAO's existing pluggable protocols use those ACE classes/interfaces.
As long as you use the same interface for your protocol as the
interface for ace/ACE_SOCK* and tao/IIOP* then you shouldn't have much
-of a problem.</BLOCKQUOTE> <P>Here are some links that describe
-the pluggable protocols framework, though not how to implement one:
-<BLOCKQUOTE> <A
-HREF="../releasenotes/index.html#pp">http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/releasenotes/index.html#pp</A><BR>
-
-<A HREF="http://www.cs.wustl.edu/~schmidt/PfHSN.ps.gz">http://www.cs.wustl.edu/~schmidt/PfHSN.ps.gz</A>
-<A
-HREF="http://www.cs.wustl.edu/~schmidt/pluggable_protocols.ps.gz">http://www.cs.wustl.edu/~schmidt/pluggable_protocols.ps.gz</A>
-</BLOCKQUOTE>
-
-<P>Note also that the TAO files pluggable.* are important to review and understand as they contain
-the abstract classes that form the common inteface for TAO's pluggable protocol framework.
-<BR>
-<P>Getting a full understanding on how IIOP was implemented (GIOP over TCP/IP) and also seeing
-how provisions were made to add UIOP, was very helpful to adding my own protocol.
-In understanding IIOP, I needed to review the section of the OMG CORBA spec on GIOP,
-IIOP and Object references and see how this would apply to my protocol.
-<BR>
-<P>In my case, I added a transport layer that uses SCRAMNet (from Systran Corp) replicated shared memory hardware. This is actual physical memory cards located on two different machines. When a change is made to one memory then that change appears very quickly (very low latency here) in
-the other memory. I decided that I would implement GIOP over SCRAMNet as this seemed
-to be the simplest. With SCRAMNet, one could implement this transport layer into the TAO ORB
-in a few different ways, GIOP over SCRAMNet, Environment-specific inter-ORB protocol (ESIOP)
-or using collocation (since it is shared replicated memory). I have not done the latter two, only
-GIOP over SCRAMNet just to get a proof of concept working.
-<BR><P>
-For a graphical representation of the extensions for the new SCRAMNet classes I have may a skeletal
-Rose diagram showing (at this point) the inheritance relationships of the new and existing classes.
+of a problem.</BLOCKQUOTE> <P>Note also that the TAO files pluggable.*
+are important to review and understand as they contain the abstract
+classes that form the common inteface for TAO's pluggable protocol
+framework. <BR> <P>Getting a full understanding on how IIOP was
+implemented (GIOP over TCP/IP) and also seeing how provisions were
+made to add UIOP, was very helpful to adding my own protocol. In
+understanding IIOP, I needed to review the section of the OMG CORBA
+spec on GIOP, IIOP and Object references and see how this would apply
+to my protocol. <BR>
+
+<P>In my case, I added a transport layer that uses SCRAMNet (from
+Systran Corp) replicated shared memory hardware. This is actual
+physical memory cards located on two different machines. When a
+change is made to one memory then that change appears very quickly
+(very low latency here) in the other memory. I decided that I would
+implement GIOP over SCRAMNet as this seemed to be the simplest. With
+SCRAMNet, one could implement this transport layer into the TAO ORB in
+a few different ways, GIOP over SCRAMNet, Environment-specific
+inter-ORB protocol (ESIOP) or using collocation (since it is shared
+replicated memory). I have not done the latter two, only GIOP over
+SCRAMNet just to get a proof of concept working.
+
+<BR><P> For a graphical representation of the extensions for the new
+SCRAMNet classes I have may a skeletal Rose diagram showing (at this
+point) the inheritance relationships of the new and existing classes.
See (TBD) ftp site for this Rose diagram.
+
<BR><P>
The new classes created were.
<BR>
@@ -3254,6 +3284,26 @@ H. Hueni, R. Johnson, and R. Engel, ``A Framework for Network Protocol
F. Buschmann, R. Meunier, H. Rohnert, P. Sommerlad, and M. Stal, <EM> Pattern-Oriented Software Architecture - A System of Patterns</EM>.
<BR>Wiley and Sons, 1996.
+<P></P><DT><A NAME="Schmidt:99x">6</A>
+<DD>
+Carlos O'Ryan, Fred Kuhns, Douglas C. Schmidt, Ossama Othman, and Jeff
+Parsons, <A
+HREF="http://www.cs.wustl.edu/~schmidt/pluggable_protocols.ps.gz"> The
+Design and Performance of a Pluggable Protocols Framework for
+Real-time Distributed Object Computing Middleware</A>, Proceedings of
+the IFIP/ACM <A
+HREF="://www.research.ibm.com/Middleware2000/">Middleware 2000</A>
+Conference, Pallisades, New York, April 3-7, 2000. <P>
+
+<P></P><DT><A NAME="Schmidt:99c">7</A> <DD> Fred Kuhns, Carlos O'Ryan,
+Douglas C. Schmidt, Ossama Othman, and Jeff Parsons, <A
+HREF="http://www.cs.wustl.edu/~schmidt/PfHSN.ps.gz">The Design and
+Performance of a Pluggable Protocols Framework for Object Request
+Broker Middleware,</A> Proceedings of the <A
+HREF="http://www.isi.edu/pfhsn99/call.html">IFIP Sixth International
+Workshop on Protocols For High-Speed Networks (PfHSN '99)</A>, Salem,
+MA, August 25--27, 1999. <P>
+
</DL>
<P>
@@ -3270,7 +3320,7 @@ examples of the Layers architecture.
<ADDRESS><a href="mailto:othman@cs.wustl.edu">Ossama Othman</a></ADDRESS>
<!-- Created: Tue Dec 14 16:53:58 CST 1999 -->
<!-- hhmts start -->
-Last modified: Sat Dec 18 14:39:35 CST 1999
+Last modified: Sun Dec 19 13:26:43 CST 1999
<!-- hhmts end -->
</BODY>
</HTML>
diff --git a/TAO/examples/Simple/time/Time_Client.java b/TAO/examples/Simple/time/Time_Client.java
index be477bfcbdd..fea83f74ce4 100644
--- a/TAO/examples/Simple/time/Time_Client.java
+++ b/TAO/examples/Simple/time/Time_Client.java
@@ -19,7 +19,7 @@
import org.omg.CosNaming.*;
import org.omg.CORBA.*;
-public class TimeClient
+public class Time_Client
{
public static void main (String args[])
{
diff --git a/TAO/utils/NamingViewer/AddNameServerDlg.cpp b/TAO/utils/NamingViewer/AddNameServerDlg.cpp
new file mode 100644
index 00000000000..37f62ab53bb
--- /dev/null
+++ b/TAO/utils/NamingViewer/AddNameServerDlg.cpp
@@ -0,0 +1,51 @@
+// $Id$
+// AddNameServerDlg.cpp : implementation file
+
+#include "stdafx.h"
+#include "NamingViewer.h"
+#include "AddNameServerDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CAddNameServerDlg dialog
+
+
+CAddNameServerDlg::CAddNameServerDlg(CWnd* pParent /*=NULL*/)
+ : CDialog(CAddNameServerDlg::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(CAddNameServerDlg)
+ m_IOR = _T("");
+ m_Name = _T("");
+ //}}AFX_DATA_INIT
+}
+
+
+void CAddNameServerDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CAddNameServerDlg)
+ DDX_Text(pDX, IDC_IOR, m_IOR);
+ DDX_Text(pDX, IDC_NAME, m_Name);
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CAddNameServerDlg, CDialog)
+ //{{AFX_MSG_MAP(CAddNameServerDlg)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CAddNameServerDlg message handlers
+
+void CAddNameServerDlg::OnOK()
+{
+ // TODO: Add extra validation here
+ UpdateData();
+ CDialog::OnOK();
+}
diff --git a/TAO/utils/NamingViewer/AddNameServerDlg.h b/TAO/utils/NamingViewer/AddNameServerDlg.h
new file mode 100644
index 00000000000..bba44188d47
--- /dev/null
+++ b/TAO/utils/NamingViewer/AddNameServerDlg.h
@@ -0,0 +1,48 @@
+// $Id$
+#if !defined(AFX_ADDNAMESERVERDLG_H__2AF5C355_B440_11D3_BF2C_00C0F03C565A__INCLUDED_)
+#define AFX_ADDNAMESERVERDLG_H__2AF5C355_B440_11D3_BF2C_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// AddNameServerDlg.h : header file
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// CAddNameServerDlg dialog
+
+class CAddNameServerDlg : public CDialog
+{
+// Construction
+public:
+ CAddNameServerDlg(CWnd* pParent = NULL); // standard constructor
+
+// Dialog Data
+ //{{AFX_DATA(CAddNameServerDlg)
+ enum { IDD = IDD_ADD_NAME_SERVER };
+ CString m_IOR;
+ CString m_Name;
+ //}}AFX_DATA
+
+
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CAddNameServerDlg)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+
+ // Generated message map functions
+ //{{AFX_MSG(CAddNameServerDlg)
+ virtual void OnOK();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_ADDNAMESERVERDLG_H__2AF5C355_B440_11D3_BF2C_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/BindDialog.cpp b/TAO/utils/NamingViewer/BindDialog.cpp
new file mode 100644
index 00000000000..e48f9cc3624
--- /dev/null
+++ b/TAO/utils/NamingViewer/BindDialog.cpp
@@ -0,0 +1,103 @@
+// $Id$
+// BindDialog.cpp : implementation file
+
+#include "stdafx.h"
+#include "NamingViewer.h"
+#include "BindDialog.h"
+#include "ViewIORDialog.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CBindDialog dialog
+
+
+CBindDialog::CBindDialog(bool Context, CORBA::ORB_ptr pORB, CWnd* pParent /*=NULL*/)
+ : CDialog(CBindDialog::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(CBindDialog)
+ m_IOR = _T("");
+ m_ID = _T("");
+ m_Kind = _T("");
+ //}}AFX_DATA_INIT
+ m_pORB = pORB;
+ m_Context = Context;
+}
+
+
+void CBindDialog::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CBindDialog)
+ DDX_Text(pDX, IDC_IOR, m_IOR);
+ DDX_Text(pDX, IDC_ID, m_ID);
+ DDX_Text(pDX, IDC_KIND, m_Kind);
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CBindDialog, CDialog)
+ //{{AFX_MSG_MAP(CBindDialog)
+ ON_BN_CLICKED(IDC_VIEWIOR, OnViewior)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CBindDialog message handlers
+
+void CBindDialog::OnViewior()
+{
+ // TODO: Add your control notification handler code here
+ try
+ {
+ UpdateData();
+ m_Object = m_pORB->string_to_object(m_IOR);
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ return;
+ }
+ ViewIORDialog Dialog(m_pORB, m_Object);
+ Dialog.DoModal();
+}
+
+BOOL CBindDialog::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+ // TODO: Add extra initialization here
+ if(m_Context)
+ {
+ SetWindowText("Bind Context");
+ }
+ else
+ {
+ SetWindowText("Bind Object");
+ }
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void CBindDialog::OnOK()
+{
+ // TODO: Add extra validation here
+ UpdateData();
+ m_Name.length(1);
+ m_Name[0].id = CORBA::string_dup(m_ID);
+ m_Name[0].kind = CORBA::string_dup(m_Kind);
+ try
+ {
+ m_Object = m_pORB->string_to_object(m_IOR);
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "Invalid IOR");
+ return;
+ }
+ CDialog::OnOK();
+}
diff --git a/TAO/utils/NamingViewer/BindDialog.h b/TAO/utils/NamingViewer/BindDialog.h
new file mode 100644
index 00000000000..afb39a5739f
--- /dev/null
+++ b/TAO/utils/NamingViewer/BindDialog.h
@@ -0,0 +1,58 @@
+// $Id$
+#if !defined(AFX_BINDDIALOG_H__1F34ADC5_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)
+#define AFX_BINDDIALOG_H__1F34ADC5_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// BindDialog.h : header file
+//
+#include "tao/corba.h"
+#include "orbsvcs/CosNamingC.h"
+/////////////////////////////////////////////////////////////////////////////
+// CBindDialog dialog
+
+class CBindDialog : public CDialog
+{
+// Construction
+public:
+ CBindDialog(bool Context, CORBA::ORB_ptr pORB, CWnd* pParent = NULL); // standard constructor
+
+// Dialog Data
+ //{{AFX_DATA(CBindDialog)
+ enum { IDD = IDD_BIND };
+ CString m_IOR;
+ CString m_ID;
+ CString m_Kind;
+ //}}AFX_DATA
+ CORBA::Object_ptr GetObject() {return m_Object;};
+
+ CosNaming::Name& GetName() {return m_Name;};
+
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CBindDialog)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+
+ // Generated message map functions
+ //{{AFX_MSG(CBindDialog)
+ afx_msg void OnViewior();
+ virtual BOOL OnInitDialog();
+ virtual void OnOK();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+ CORBA::Object_var m_Object;
+ CORBA::ORB_ptr m_pORB;
+ CosNaming::Name m_Name;
+ bool m_Context;
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_BINDDIALOG_H__1F34ADC5_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/BindNewContext.cpp b/TAO/utils/NamingViewer/BindNewContext.cpp
new file mode 100644
index 00000000000..66d7f942ca3
--- /dev/null
+++ b/TAO/utils/NamingViewer/BindNewContext.cpp
@@ -0,0 +1,54 @@
+// $Id$
+// BindNewContext.cpp : implementation file
+
+#include "stdafx.h"
+#include "NamingViewer.h"
+#include "BindNewContext.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CBindNewContext dialog
+
+
+CBindNewContext::CBindNewContext(CWnd* pParent /*=NULL*/)
+ : CDialog(CBindNewContext::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(CBindNewContext)
+ m_ID = _T("");
+ m_Kind = _T("");
+ //}}AFX_DATA_INIT
+}
+
+
+void CBindNewContext::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CBindNewContext)
+ DDX_Text(pDX, IDC_ID, m_ID);
+ DDX_Text(pDX, IDC_KIND, m_Kind);
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CBindNewContext, CDialog)
+ //{{AFX_MSG_MAP(CBindNewContext)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CBindNewContext message handlers
+
+void CBindNewContext::OnOK()
+{
+ // TODO: Add extra validation here
+ UpdateData();
+ m_Name.length(1);
+ m_Name[0].id = CORBA::string_dup(m_ID);
+ m_Name[0].kind = CORBA::string_dup(m_Kind);
+ CDialog::OnOK();
+}
diff --git a/TAO/utils/NamingViewer/BindNewContext.h b/TAO/utils/NamingViewer/BindNewContext.h
new file mode 100644
index 00000000000..8c76dcdfc1e
--- /dev/null
+++ b/TAO/utils/NamingViewer/BindNewContext.h
@@ -0,0 +1,50 @@
+// $Id$
+#if !defined(AFX_BINDNEWCONTEXT_H__2AF5C352_B440_11D3_BF2C_00C0F03C565A__INCLUDED_)
+#define AFX_BINDNEWCONTEXT_H__2AF5C352_B440_11D3_BF2C_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// BindNewContext.h : header file
+//
+#include "orbsvcs/CosNamingC.H"
+/////////////////////////////////////////////////////////////////////////////
+// CBindNewContext dialog
+
+class CBindNewContext : public CDialog
+{
+// Construction
+public:
+ CBindNewContext(CWnd* pParent = NULL); // standard constructor
+
+// Dialog Data
+ //{{AFX_DATA(CBindNewContext)
+ enum { IDD = IDD_BIND_NEW_CONTEXT };
+ CString m_ID;
+ CString m_Kind;
+ //}}AFX_DATA
+ CosNaming::Name& GetName() {return m_Name;};
+
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CBindNewContext)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+
+ // Generated message map functions
+ //{{AFX_MSG(CBindNewContext)
+ virtual void OnOK();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+
+ CosNaming::Name m_Name;
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_BINDNEWCONTEXT_H__2AF5C352_B440_11D3_BF2C_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/NamingObject.cpp b/TAO/utils/NamingViewer/NamingObject.cpp
new file mode 100644
index 00000000000..31cc829598b
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingObject.cpp
@@ -0,0 +1,49 @@
+// $Id$
+// NamingObject.cpp: implementation of the CNamingObject class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "stdafx.h"
+#include "NamingViewer.h"
+#include "NamingObject.h"
+
+#ifdef _DEBUG
+#undef THIS_FILE
+static char THIS_FILE[]=__FILE__;
+#define new DEBUG_NEW
+#endif
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CNamingObject::CNamingObject(CosNaming::Name& Name, CORBA::Object_ptr pObject, bool Context)
+: m_Name(Name), m_Object(CORBA::Object::_duplicate(pObject)), m_Context(Context)
+{
+
+}
+
+
+CNamingObject::CNamingObject(CORBA::Object_ptr pObject)
+: m_Object(CORBA::Object::_duplicate(pObject))
+{
+}
+
+CNamingObject::~CNamingObject()
+{
+}
+
+CosNaming::NamingContext_ptr CNamingObject::NamingContext()
+{
+ return CosNaming::NamingContext::_narrow(m_Object);
+}
+
+CORBA::Object_ptr CNamingObject::Object()
+{
+ return m_Object;
+}
+
+CosNaming::Name& CNamingObject::Name()
+{
+ return m_Name;
+}
diff --git a/TAO/utils/NamingViewer/NamingObject.h b/TAO/utils/NamingViewer/NamingObject.h
new file mode 100644
index 00000000000..209696b20e7
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingObject.h
@@ -0,0 +1,36 @@
+// $Id$
+// NamingObject.h: interface for the CNamingObject class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_NAMINGOBJECT_H__1F34ADC4_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)
+#define AFX_NAMINGOBJECT_H__1F34ADC4_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "orbsvcs/CosNamingC.h"
+
+class CNamingObject
+{
+public:
+ CNamingObject(CosNaming::Name& Name, CORBA::Object_ptr pObject, bool Context);
+ CNamingObject(CORBA::Object_ptr pObject);
+ ~CNamingObject();
+
+ CosNaming::NamingContext_ptr NamingContext();
+ // Returns a duplicated naming context ptr if this is a context or nil if its not
+ CORBA::Object_ptr Object();
+ // returns a non duplicated object reference
+ CosNaming::Name& Name();
+ // returns the name of the object
+ bool IsContext() {return m_Context;};
+ // Returns true if this is a context
+private:
+ CORBA::Object_var m_Object;
+ CosNaming::Name m_Name;
+ bool m_Context;
+};
+
+#endif // !defined(AFX_NAMINGOBJECT_H__1F34ADC4_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/NamingTreeCtrl.cpp b/TAO/utils/NamingViewer/NamingTreeCtrl.cpp
new file mode 100644
index 00000000000..f83423d32d0
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingTreeCtrl.cpp
@@ -0,0 +1,505 @@
+// $Id$
+// NamingTreeCtrl.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "NamingViewer.h"
+#include "NamingTreeCtrl.h"
+#include "ViewIORDialog.h"
+#include "NamingObject.h"
+#include "BindDialog.h"
+#include "BindNewContext.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CNamingTreeCtrl
+
+CNamingTreeCtrl::CNamingTreeCtrl()
+{
+ m_ContextPopup.LoadMenu(IDR_CONTEXT_POPUP);
+ m_ObjectPopup.LoadMenu(IDR_OBJECT_POPUP);
+}
+
+CNamingTreeCtrl::~CNamingTreeCtrl()
+{
+}
+
+
+BEGIN_MESSAGE_MAP(CNamingTreeCtrl, CTreeCtrl)
+ //{{AFX_MSG_MAP(CNamingTreeCtrl)
+ ON_WM_RBUTTONDOWN()
+ ON_COMMAND(ID_CONTEXT_POPUP_VIEWREFERENCE, OnContextPopupViewreference)
+ ON_NOTIFY_REFLECT(TVN_ITEMEXPANDING, OnItemexpanding)
+ ON_COMMAND(ID_CONTEXT_POPUP_REFRESH, OnContextPopupRefresh)
+ ON_COMMAND(ID_CONTEXT_POPUP_UNBIND, OnContextPopupUnbind)
+ ON_COMMAND(ID_CONTEXT_POPUP_DESTROY, OnContextPopupDestroy)
+ ON_COMMAND(ID_CONTEXT_POPUP_BIND_CONTEXT, OnContextPopupBindContext)
+ ON_COMMAND(ID_CONTEXT_POPUP_BINDOBJECT, OnContextPopupBindobject)
+ ON_WM_DESTROY()
+ ON_COMMAND(ID_CONTEXTPOPUP_BINDNEWCONTEXT, OnContextpopupBindnewcontext)
+ ON_NOTIFY_REFLECT(NM_DBLCLK, OnDblclk)
+ ON_COMMAND(ID_OBJECTPOPUP_UNBIND, OnObjectpopupUnbind)
+ ON_COMMAND(ID_OBJECTPOPUP_VIEWREFRENCE, OnObjectpopupViewrefrence)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CNamingTreeCtrl message handlers
+
+void CNamingTreeCtrl::OnRButtonDown(UINT nFlags, CPoint point)
+{
+ // TODO: Add your message handler code here and/or call default
+ // Special case here - this causes the entry to be selected when the right button
+ // is the first to be hit. strange
+ OnLButtonDown(nFlags, point);
+
+ // Now find the item were hitting
+ HTREEITEM hItem = HitTest(point);
+ if(!hItem)
+ {
+ return;
+ }
+ SelectItem(hItem);
+
+ POINT Point = point;
+ ClientToScreen(&Point);
+ CNamingObject* pObject = GetTreeObject(hItem);
+ CosNaming::NamingContext_var Context = pObject->NamingContext();
+ if(CORBA::is_nil(Context))
+ {
+ if(!m_ObjectPopup.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, Point.x, Point.y, this))
+ {
+ TRACE0("TrackPopupMenu Failed");
+ }
+ }
+ else
+ {
+ if(!m_ContextPopup.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, Point.x, Point.y, this))
+ {
+ TRACE0("TrackPopupMenu Failed");
+ }
+ }
+}
+
+void CNamingTreeCtrl::OnContextPopupViewreference()
+{
+ // TODO: Add your command handler code here
+ ViewIORDialog Dialog(m_pORB, GetTreeObject()->Object());
+ Dialog.DoModal();
+}
+
+void CNamingTreeCtrl::SetpORB(CORBA::ORB_ptr pORB)
+{
+ m_pORB = pORB;
+}
+
+CNamingObject* CNamingTreeCtrl::GetTreeObject(HTREEITEM hItem)
+{
+ if(hItem == NULL)
+ {
+ hItem = GetSelectedItem();
+ if(!hItem)
+ {
+ return 0;
+ }
+ }
+ CNamingObject* pObject = (CNamingObject*)GetItemData(hItem);
+ return pObject;
+}
+
+void CNamingTreeCtrl::ClearChildren(HTREEITEM hItem)
+{
+ if(hItem == NULL)
+ {
+ HTREEITEM hItem = GetRootItem();
+ if(hItem)
+ {
+
+ //CORBA::Object_var Object = (CORBA::Object_ptr)GetItemData(hItem);
+ ClearChildren(hItem);
+ delete GetTreeObject(hItem);
+ DeleteItem(hItem);
+ }
+ return;
+ }
+
+ HTREEITEM hChild;
+ while(hChild = GetNextItem(hItem, TVGN_CHILD))
+ {
+ // Remove our reference count on the object reference
+ ClearChildren(hChild);
+ delete GetTreeObject(hChild);
+ DeleteItem(hChild);
+ }
+}
+
+
+#define LISTQUANTUM 40
+
+void CNamingTreeCtrl::ListContext(HTREEITEM hItem)
+{
+ CWaitCursor Waiter;
+ try
+ {
+ // Get the items object and make sure we have a context
+ CNamingObject* pObject = GetTreeObject(hItem);
+ CosNaming::NamingContext_var Context = pObject->NamingContext();
+ if(CORBA::is_nil(Context))
+ {
+ return;
+ }
+
+ // List the contexts entries
+ CosNaming::BindingList_var bl;
+ CosNaming::BindingIterator_var bi;
+ Context->list(LISTQUANTUM, bl, bi);
+ ListBindingList(hItem, Context, bl);
+
+ if(!CORBA::is_nil(bi))
+ {
+ while(bl->length())
+ {
+ CString Text;
+ Text.Format("This context contains more than %d entries, list the next %d?", LISTQUANTUM, LISTQUANTUM);
+ if(MessageBox(Text, "Question", MB_YESNO) == IDNO)
+ {
+ return;
+ }
+ bi->next_n(LISTQUANTUM, bl);
+ ListBindingList(hItem, Context, bl);
+ }
+ bi->destroy();
+ }
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+void CNamingTreeCtrl::OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
+ // TODO: Add your control notification handler code here
+ *pResult = 0;
+ // If this item has a child, it has already been listed so nothing to do..
+ if(GetChildItem(pNMTreeView->itemNew.hItem))
+ {
+ return;
+ }
+ ListContext(pNMTreeView->itemNew.hItem);
+}
+
+void CNamingTreeCtrl::OnContextPopupRefresh()
+{
+ // TODO: Add your command handler code here
+ HTREEITEM hItem = GetSelectedItem();
+ ClearChildren(hItem);
+ ListContext(hItem);
+}
+
+void CNamingTreeCtrl::OnContextPopupUnbind()
+{
+ // TODO: Add your command handler code here
+ if(MessageBox("Are you sure you want to unbind this object?", "Confirm", MB_YESNO | MB_ICONEXCLAMATION) != IDYES)
+ {
+ return;
+ }
+ HTREEITEM hItem = GetSelectedItem();
+ HTREEITEM hParent = GetParentItem(hItem);
+ if(!hParent)
+ {
+ return;
+ }
+ CNamingObject* pObject = GetTreeObject(hItem);
+ CNamingObject* pParent= GetTreeObject(hParent);
+ CosNaming::NamingContext_var Context = pParent->NamingContext();
+ try
+ {
+ Context->unbind(pObject->Name());
+ ClearChildren(hItem);
+ delete pObject;
+ DeleteItem(hItem);
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+void CNamingTreeCtrl::Resolve(CosNaming::NamingContext_ptr pRootContext)
+{
+ ClearChildren();
+ if(!CORBA::is_nil(pRootContext))
+ {
+ HTREEITEM hItem = InsertItem("Root");
+ SetItemData(hItem, (DWORD)new CNamingObject(pRootContext));
+ ListContext(hItem);
+ }
+}
+
+void CNamingTreeCtrl::OnContextPopupDestroy()
+{
+ // TODO: Add your command handler code here
+ if(MessageBox("Are you sure you want to destroy this context?", "Confirm", MB_YESNO | MB_ICONEXCLAMATION) != IDYES)
+ {
+ return;
+ }
+ HTREEITEM hItem = GetSelectedItem();
+ HTREEITEM hParent = GetParentItem(hItem);
+ if(!hParent)
+ {
+ return;
+ }
+ CNamingObject* pObject = GetTreeObject(hItem);
+ CNamingObject* pParent= GetTreeObject(hParent);
+ CosNaming::NamingContext_var Parent = pParent->NamingContext();
+ try
+ {
+ // First try to destroy, it will raise exception if its not empty
+ CosNaming::NamingContext_var Context = pObject->NamingContext();
+ Context->destroy();
+ // Ok its destroyed, clean up any children we might have laying around
+ ClearChildren(hItem);
+ DeleteItem(hItem);
+ // do the unbind
+ Parent->unbind(pObject->Name());
+ delete pObject;
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+void CNamingTreeCtrl::OnContextPopupBindContext()
+{
+ // TODO: Add your command handler code here
+ CBindDialog Dialog(true, m_pORB);
+ if(Dialog.DoModal() != IDOK)
+ {
+ return;
+ }
+ try
+ {
+ CNamingObject* pObject = GetTreeObject();
+ CosNaming::NamingContext_var Context = pObject->NamingContext();
+ if(CORBA::is_nil(Context))
+ {
+ return;
+ }
+ CosNaming::NamingContext_var NewContext = CosNaming::NamingContext::_narrow(Dialog.GetObject());
+ if(CORBA::is_nil(NewContext))
+ {
+ AfxMessageBox("Object is not a CosNaming::NamingContext");
+ return;
+ }
+ Context->bind_context(Dialog.GetName(), NewContext);
+ OnContextPopupRefresh();
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+void CNamingTreeCtrl::OnContextPopupBindobject()
+{
+ // TODO: Add your command handler code here
+ CBindDialog Dialog(false, m_pORB);
+ if(Dialog.DoModal() != IDOK)
+ {
+ return;
+ }
+ try
+ {
+ HTREEITEM hItem = GetSelectedItem();
+ CNamingObject* pObject = GetTreeObject(hItem);
+ CosNaming::NamingContext_var Context = pObject->NamingContext();
+ if(CORBA::is_nil(Context))
+ {
+ return;
+ }
+ Context->bind(Dialog.GetName(), Dialog.GetObject());
+ OnContextPopupRefresh();
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+void CNamingTreeCtrl::OnDestroy()
+{
+ CTreeCtrl::OnDestroy();
+
+ // TODO: Add your message handler code here
+ ClearChildren();
+
+}
+
+
+void CNamingTreeCtrl::OnContextpopupBindnewcontext()
+{
+ // TODO: Add your command handler code here
+ HTREEITEM hItem = GetSelectedItem();
+ CNamingObject* pObject = GetTreeObject(hItem);
+ CosNaming::NamingContext_var Context = pObject->NamingContext();
+ if(CORBA::is_nil(Context))
+ {
+ return;
+ }
+ CBindNewContext Dialog;
+ if(Dialog.DoModal() != IDOK)
+ {
+ return;
+ }
+ try
+ {
+ CosNaming::NamingContext_var NewContext;
+ NewContext = Context->new_context();
+ Context->bind_context(Dialog.GetName(), NewContext);
+ OnContextPopupRefresh();
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+void CNamingTreeCtrl::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ // TODO: Add your control notification handler code here
+ CNamingObject* pObject = GetTreeObject();
+ // Only display non contexts
+ if(!pObject->IsContext())
+ {
+ ViewIORDialog Dialog(m_pORB, pObject->Object());
+ Dialog.DoModal();
+ }
+
+ *pResult = 0;
+}
+
+void CNamingTreeCtrl::OnCopy()
+{
+ // TODO: Add your command handler code here
+ CNamingObject* pObject = GetTreeObject();
+ try
+ {
+ CString IOR = m_pORB->object_to_string(pObject->Object());
+ // Copy to the clipboard by using the CEdit control. This is easier
+ // that doing it the right way
+ CEdit Temp;
+ CRect None(0,0, 1, 1);
+ Temp.Create(0, None, this, 0);
+ Temp.SetWindowText(IOR);
+ Temp.SetSel(0, IOR.GetLength());
+ Temp.Copy();
+ Temp.PostMessage(WM_CLOSE);
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+LRESULT CNamingTreeCtrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ // TODO: Add your specialized code here and/or call the base class
+ if(message == WM_HOTKEY)
+ {
+ // To trap control-c (for copying) we registered a hotkey. For some reason
+ // MFC wasn't calling my OnHotKey() function that I registered so I am forcing
+ // it this way. Anyone know the right way to do this?
+ OnCopy();
+ }
+ return CTreeCtrl::WindowProc(message, wParam, lParam);
+}
+
+void CNamingTreeCtrl::OnObjectpopupUnbind()
+{
+ // TODO: Add your command handler code here
+ if(MessageBox("Are you sure you want to unbind this object?", "Confirm", MB_YESNO | MB_ICONEXCLAMATION) != IDYES)
+ {
+ return;
+ }
+ HTREEITEM hItem = GetSelectedItem();
+ HTREEITEM hParent = GetParentItem(hItem);
+ if(!hParent)
+ {
+ return;
+ }
+ CNamingObject* pObject = GetTreeObject(hItem);
+ CNamingObject* pParent= GetTreeObject(hParent);
+ CosNaming::NamingContext_var Context = pParent->NamingContext();
+ try
+ {
+ Context->unbind(pObject->Name());
+ ClearChildren(hItem);
+ delete pObject;
+ DeleteItem(hItem);
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+void CNamingTreeCtrl::OnObjectpopupViewrefrence()
+{
+ // TODO: Add your command handler code here
+ ViewIORDialog Dialog(m_pORB, GetTreeObject()->Object());
+ Dialog.DoModal();
+}
+
+void CNamingTreeCtrl::ListBindingList(HTREEITEM hItem, CosNaming::NamingContext_ptr pContext, CosNaming::BindingList_var& bl)
+{
+ try
+ {
+ for(unsigned int i=0; i < bl->length(); i++)
+ {
+ // Add each entry into the tree control
+ CORBA::Object_var Object = pContext->resolve(bl[i].binding_name);
+ bool Context = (bl[i].binding_type == CosNaming::ncontext);
+ CNamingObject* pNewObject = new CNamingObject(bl[i].binding_name, Object, Context);
+ CString Name;
+ const char* pKind = (bl[i].binding_name[0]).kind;
+ if(*pKind)
+ {
+ Name.Format("%s | %s", (bl[i].binding_name[0]).id, pKind);
+ }
+ else
+ {
+ Name.Format("%s", (bl[i].binding_name[0]).id);
+ }
+ HTREEITEM hContext = InsertItem(Name, hItem);
+ SetItemData(hContext, (DWORD)pNewObject);
+ switch(bl[i].binding_type)
+ {
+ case CosNaming::ncontext:
+ {
+ // Set the children flag so the + button is displayed
+ TV_ITEM Item;
+ Item.mask = TVIF_CHILDREN | TVIF_HANDLE;
+ Item.cChildren = 1;
+ Item.hItem = hContext;
+ SetItem(&Item);
+ }
+ break;
+ case CosNaming::nobject:
+ break;
+ }
+ }
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
diff --git a/TAO/utils/NamingViewer/NamingTreeCtrl.h b/TAO/utils/NamingViewer/NamingTreeCtrl.h
new file mode 100644
index 00000000000..8c871ad3792
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingTreeCtrl.h
@@ -0,0 +1,75 @@
+// $Id$
+#if !defined(AFX_NAMINGTREECTRL_H__1F34ADC2_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)
+#define AFX_NAMINGTREECTRL_H__1F34ADC2_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// NamingTreeCtrl.h : header file
+//
+#include "orbsvcs/CosNamingC.h"
+class CNamingObject;
+
+/////////////////////////////////////////////////////////////////////////////
+// CNamingTreeCtrl window
+
+class CNamingTreeCtrl : public CTreeCtrl
+{
+// Construction
+public:
+ CNamingTreeCtrl();
+
+// Attributes
+public:
+ void SetpORB(CORBA::ORB_ptr pORB);
+// Operations
+public:
+ CNamingObject* GetTreeObject(HTREEITEM hItem = NULL);
+ void ClearChildren(HTREEITEM hItem = NULL);
+ void ListContext(HTREEITEM hItem);
+ void Resolve(CosNaming::NamingContext_ptr pRootContext);
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CNamingTreeCtrl)
+ protected:
+ virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
+ //}}AFX_VIRTUAL
+
+// Implementation
+public:
+ virtual ~CNamingTreeCtrl();
+
+ // Generated message map functions
+protected:
+ //{{AFX_MSG(CNamingTreeCtrl)
+ afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
+ afx_msg void OnContextPopupViewreference();
+ afx_msg void OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult);
+ afx_msg void OnContextPopupRefresh();
+ afx_msg void OnContextPopupUnbind();
+ afx_msg void OnContextPopupDestroy();
+ afx_msg void OnContextPopupBindContext();
+ afx_msg void OnContextPopupBindobject();
+ afx_msg void OnDestroy();
+ afx_msg void OnContextpopupBindnewcontext();
+ afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
+ afx_msg void OnObjectpopupUnbind();
+ afx_msg void OnObjectpopupViewrefrence();
+ //}}AFX_MSG
+
+ DECLARE_MESSAGE_MAP()
+
+ void Refresh(HTREEITEM hItem);
+ void OnCopy();
+ void ListBindingList(HTREEITEM hItem, CosNaming::NamingContext_ptr pContext, CosNaming::BindingList_var& bl);
+ CMenu m_ContextPopup;
+ CMenu m_ObjectPopup;
+ CORBA::ORB_ptr m_pORB;
+};
+
+/////////////////////////////////////////////////////////////////////////////
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_NAMINGTREECTRL_H__1F34ADC2_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/NamingViewer.cpp b/TAO/utils/NamingViewer/NamingViewer.cpp
new file mode 100644
index 00000000000..78007a11783
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingViewer.cpp
@@ -0,0 +1,84 @@
+// $Id$
+// NamingViewer.cpp : Defines the class behaviors for the application.
+//
+
+#include "stdafx.h"
+#include "NamingViewer.h"
+#include "NamingViewerDlg.h"
+#include "ace/ARGV.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CNamingViewerApp
+
+BEGIN_MESSAGE_MAP(CNamingViewerApp, CWinApp)
+ //{{AFX_MSG_MAP(CNamingViewerApp)
+ // NOTE - the ClassWizard will add and remove mapping macros here.
+ // DO NOT EDIT what you see in these blocks of generated code!
+ //}}AFX_MSG
+ ON_COMMAND(ID_HELP, CWinApp::OnHelp)
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CNamingViewerApp construction
+
+CNamingViewerApp::CNamingViewerApp()
+{
+ // TODO: add construction code here,
+ // Place all significant initialization in InitInstance
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// The one and only CNamingViewerApp object
+
+CNamingViewerApp theApp;
+
+/////////////////////////////////////////////////////////////////////////////
+// CNamingViewerApp initialization
+
+BOOL CNamingViewerApp::InitInstance()
+{
+ // Standard initialization
+ // If you are not using these features and wish to reduce the size
+ // of your final executable, you should remove from the following
+ // the specific initialization routines you do not need.
+
+#ifdef _AFXDLL
+ Enable3dControls(); // Call this when using MFC in a shared DLL
+#else
+ Enable3dControlsStatic(); // Call this when linking to MFC statically
+#endif
+
+ // Parse command line arguments so we can initialize ORB with them
+ ACE_ARGV Argv(m_lpCmdLine);
+
+ ACE::init();
+ {
+
+ int argc = Argv.argc();
+ char** argv = Argv.argv();
+ CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
+ CNamingViewerDlg dlg(ORB);
+ m_pMainWnd = &dlg;
+ int nResponse = dlg.DoModal();
+ if (nResponse == IDOK)
+ {
+ // TODO: Place code here to handle when the dialog is
+ // dismissed with OK
+ }
+ else if (nResponse == IDCANCEL)
+ {
+ // TODO: Place code here to handle when the dialog is
+ // dismissed with Cancel
+ }
+ }
+ ACE::fini();
+ // Since the dialog has been closed, return FALSE so that we exit the
+ // application, rather than start the application's message pump.
+ return FALSE;
+}
diff --git a/TAO/utils/NamingViewer/NamingViewer.dsp b/TAO/utils/NamingViewer/NamingViewer.dsp
new file mode 100644
index 00000000000..d50c122b9e3
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingViewer.dsp
@@ -0,0 +1,204 @@
+# Microsoft Developer Studio Project File - Name="NamingViewer" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=NamingViewer - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "NamingViewer.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "NamingViewer.mak" CFG="NamingViewer - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "NamingViewer - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "NamingViewer - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "NamingViewer - Win32 Release"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
+# ADD LINK32 tao.lib ace.lib orbsvcs.lib /nologo /subsystem:windows /machine:I386
+
+!ELSEIF "$(CFG)" == "NamingViewer - Win32 Debug"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 taod.lib aced.lib orbsvcsd.lib /nologo /subsystem:windows /debug /machine:I386 /out:"Debug/NamingViewerd.exe" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "NamingViewer - Win32 Release"
+# Name "NamingViewer - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AddNameServerDlg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\BindDialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\BindNewContext.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\NamingObject.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\NamingTreeCtrl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\NamingViewer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\NamingViewer.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\NamingViewerDlg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SelectNSDialog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"stdafx.h"
+# End Source File
+# Begin Source File
+
+SOURCE=.\ViewIORDialog.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\AddNameServerDlg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\BindDialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\BindNewContext.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\NamingObject.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\NamingTreeCtrl.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\NamingViewer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\NamingViewerDlg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Resource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SelectNSDialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ViewIORDialog.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\res\NamingViewer.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\NamingViewer.rc2
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/utils/NamingViewer/NamingViewer.dsw b/TAO/utils/NamingViewer/NamingViewer.dsw
new file mode 100644
index 00000000000..229fa03398e
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingViewer.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "NamingViewer"=.\NamingViewer.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/utils/NamingViewer/NamingViewer.h b/TAO/utils/NamingViewer/NamingViewer.h
new file mode 100644
index 00000000000..84853ad13cd
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingViewer.h
@@ -0,0 +1,50 @@
+// $Id$
+// NamingViewer.h : main header file for the NAMINGVIEWER application
+//
+
+#if !defined(AFX_NAMINGVIEWER_H__B9C0EB96_AD28_11D3_BF1F_00C0F03C565A__INCLUDED_)
+#define AFX_NAMINGVIEWER_H__B9C0EB96_AD28_11D3_BF1F_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#ifndef __AFXWIN_H__
+ #error include 'stdafx.h' before including this file for PCH
+#endif
+
+#include "resource.h" // main symbols
+
+/////////////////////////////////////////////////////////////////////////////
+// CNamingViewerApp:
+// See NamingViewer.cpp for the implementation of this class
+//
+
+class CNamingViewerApp : public CWinApp
+{
+public:
+ CNamingViewerApp();
+
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CNamingViewerApp)
+ public:
+ virtual BOOL InitInstance();
+ //}}AFX_VIRTUAL
+
+// Implementation
+
+ //{{AFX_MSG(CNamingViewerApp)
+ // NOTE - the ClassWizard will add and remove member functions here.
+ // DO NOT EDIT what you see in these blocks of generated code !
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_NAMINGVIEWER_H__B9C0EB96_AD28_11D3_BF1F_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/NamingViewer.rc b/TAO/utils/NamingViewer/NamingViewer.rc
new file mode 100644
index 00000000000..7f85193a752
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingViewer.rc
@@ -0,0 +1,355 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "#ifdef _WIN32\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#endif //_WIN32\r\n"
+ "#include ""res\\NamingViewer.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDR_MAINFRAME ICON DISCARDABLE "res\\NamingViewer.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 62
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About NamingViewer"
+FONT 8, "MS Sans Serif"
+BEGIN
+ ICON IDR_MAINFRAME,IDC_STATIC,11,17,21,20
+ LTEXT "NamingViewer Version 1.0",IDC_STATIC,40,10,119,8,
+ SS_NOPREFIX
+ LTEXT "Copyright (C) 1999",IDC_STATIC,40,25,119,8
+ DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP
+ LTEXT "Author: Chris Hafey (chris@stentorsoft.com)",IDC_STATIC,
+ 40,41,138,8
+END
+
+IDD_NAMINGVIEWER_DIALOG DIALOGEX 0, 0, 248, 198
+STYLE WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU |
+ WS_THICKFRAME
+EXSTYLE WS_EX_APPWINDOW
+CAPTION "NamingViewer"
+FONT 8, "MS Sans Serif"
+BEGIN
+ CONTROL "Tree1",IDC_TREE,"SysTreeView32",TVS_HASBUTTONS |
+ TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
+ 7,42,234,149
+ GROUPBOX "Name Server",IDC_NS,7,7,234,30
+ PUSHBUTTON "Select",IDC_SELECT_NS,184,18,50,12
+ EDITTEXT IDC_SERVER,13,18,158,12,ES_AUTOHSCROLL | ES_READONLY
+END
+
+IDD_VIEWIOR_DIALOG DIALOG DISCARDABLE 0, 0, 399, 127
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "View IOR"
+FONT 8, "MS Sans Serif"
+BEGIN
+ PUSHBUTTON "OK",IDOK,342,26,50,14
+ LTEXT "IOR:",IDC_STATIC,7,9,16,8
+ EDITTEXT IDC_IOR,27,7,304,12,ES_AUTOHSCROLL
+ LTEXT "Repository ID:",IDC_STATIC,7,30,46,8
+ EDITTEXT IDC_TYPE_ID,57,27,274,12,ES_AUTOHSCROLL | ES_READONLY
+ DEFPUSHBUTTON "Apply",IDC_APPLY,342,7,50,14
+ CONTROL "Tree1",IDC_PROFILES,"SysTreeView32",TVS_HASBUTTONS |
+ TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
+ 7,49,385,70
+END
+
+IDD_BIND DIALOG DISCARDABLE 0, 0, 279, 66
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Bind Object/Context"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,77,45,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,152,45,50,14
+ LTEXT "Id:",IDC_STATIC,7,9,9,8
+ EDITTEXT IDC_ID,35,7,115,12,ES_AUTOHSCROLL
+ LTEXT "Kind:",IDC_STATIC,163,9,17,8
+ LTEXT "IOR:",IDC_STATIC,7,28,22,8
+ EDITTEXT IDC_IOR,35,26,174,12,ES_AUTOHSCROLL
+ EDITTEXT IDC_KIND,185,7,87,12,ES_AUTOHSCROLL
+ PUSHBUTTON "View IOR",IDC_VIEWIOR,222,26,50,12
+END
+
+IDD_BIND_NEW_CONTEXT DIALOG DISCARDABLE 0, 0, 159, 76
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Bind New Context"
+FONT 8, "MS Sans Serif"
+BEGIN
+ EDITTEXT IDC_ID,27,7,125,12,ES_AUTOHSCROLL
+ EDITTEXT IDC_KIND,27,31,125,12,ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,18,55,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,91,55,50,14
+ LTEXT "Id:",IDC_STATIC,7,10,16,8
+ LTEXT "Kind:",IDC_STATIC,7,34,17,8
+END
+
+IDD_SELECT_NS DIALOG DISCARDABLE 0, 0, 186, 94
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Select Naming Service"
+FONT 8, "MS Sans Serif"
+BEGIN
+ LISTBOX IDC_SERVERS,7,7,107,80,LBS_SORT | LBS_NOINTEGRALHEIGHT |
+ WS_VSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "OK",IDOK,129,7,50,14
+ PUSHBUTTON "Add",IDC_ADD,129,29,50,14
+ PUSHBUTTON "Remove",IDC_REMOVE,129,51,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,129,73,50,14
+END
+
+IDD_ADD_NAME_SERVER DIALOG DISCARDABLE 0, 0, 186, 69
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Add Name Server"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,26,48,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,109,48,50,14
+ LTEXT "Name:",IDC_STATIC,7,10,22,8
+ LTEXT "IOR:",IDC_STATIC,7,30,24,8
+ EDITTEXT IDC_NAME,36,7,143,12,ES_AUTOHSCROLL
+ EDITTEXT IDC_IOR,37,27,142,12,ES_AUTOHSCROLL
+END
+
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "NamingViewer MFC Application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "NamingViewer\0"
+ VALUE "LegalCopyright", "Copyright (C) 1999\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "NamingViewer.EXE\0"
+ VALUE "ProductName", "NamingViewer Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // !_MAC
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_ABOUTBOX, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 228
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 55
+ END
+
+ IDD_NAMINGVIEWER_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 241
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 191
+ END
+
+ IDD_VIEWIOR_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 392
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 120
+ END
+
+ IDD_BIND, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 272
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 59
+ END
+
+ IDD_BIND_NEW_CONTEXT, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 152
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 69
+ END
+
+ IDD_SELECT_NS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 179
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 87
+ END
+
+ IDD_ADD_NAME_SERVER, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 179
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 62
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDR_CONTEXT_POPUP MENU DISCARDABLE
+BEGIN
+ POPUP "Context_Popup"
+ BEGIN
+ MENUITEM "Bind Context", ID_CONTEXT_POPUP_BIND_CONTEXT
+
+ MENUITEM "Bind New Context", ID_CONTEXTPOPUP_BINDNEWCONTEXT
+
+ MENUITEM "Bind Object", ID_CONTEXT_POPUP_BINDOBJECT
+ MENUITEM "Unbind", ID_CONTEXT_POPUP_UNBIND
+ MENUITEM "Destroy", ID_CONTEXT_POPUP_DESTROY
+ MENUITEM "View Reference", ID_CONTEXT_POPUP_VIEWREFERENCE
+
+ MENUITEM "Refresh", ID_CONTEXT_POPUP_REFRESH
+ END
+END
+
+IDR_OBJECT_POPUP MENU DISCARDABLE
+BEGIN
+ POPUP "Object_Popup"
+ BEGIN
+ MENUITEM "Unbind", ID_OBJECTPOPUP_UNBIND
+ MENUITEM "View Refrence", ID_OBJECTPOPUP_VIEWREFRENCE
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_ABOUTBOX "&About NamingViewer..."
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#endif //_WIN32
+#include "res\NamingViewer.rc2" // non-Microsoft Visual C++ edited resources
+#include "afxres.rc" // Standard components
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/TAO/utils/NamingViewer/NamingViewerDlg.cpp b/TAO/utils/NamingViewer/NamingViewerDlg.cpp
new file mode 100644
index 00000000000..214169ab395
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingViewerDlg.cpp
@@ -0,0 +1,262 @@
+// $Id$
+// NamingViewerDlg.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "NamingViewer.h"
+#include "NamingViewerDlg.h"
+#include "ViewIORDialog.h"
+#include "ORBSvcs/Naming/Naming_Utils.h"
+#include "SelectNSDialog.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CAboutDlg dialog used for App About
+
+class CAboutDlg : public CDialog
+{
+public:
+ CAboutDlg();
+
+// Dialog Data
+ //{{AFX_DATA(CAboutDlg)
+ enum { IDD = IDD_ABOUTBOX };
+ //}}AFX_DATA
+
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CAboutDlg)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+ //{{AFX_MSG(CAboutDlg)
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+};
+
+CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
+{
+ //{{AFX_DATA_INIT(CAboutDlg)
+ //}}AFX_DATA_INIT
+}
+
+void CAboutDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CAboutDlg)
+ //}}AFX_DATA_MAP
+}
+
+BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
+ //{{AFX_MSG_MAP(CAboutDlg)
+ // No message handlers
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CNamingViewerDlg dialog
+
+CNamingViewerDlg::CNamingViewerDlg(CORBA::ORB_ptr pORB, CWnd* pParent /*=NULL*/)
+ : CDialog(CNamingViewerDlg::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(CNamingViewerDlg)
+ m_Server = _T("");
+ //}}AFX_DATA_INIT
+ // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
+ m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
+
+ m_pORB = pORB;
+
+}
+
+void CNamingViewerDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CNamingViewerDlg)
+ DDX_Control(pDX, IDC_TREE, m_Tree);
+ DDX_Text(pDX, IDC_SERVER, m_Server);
+ //}}AFX_DATA_MAP
+}
+
+BEGIN_MESSAGE_MAP(CNamingViewerDlg, CDialog)
+ //{{AFX_MSG_MAP(CNamingViewerDlg)
+ ON_WM_SYSCOMMAND()
+ ON_WM_PAINT()
+ ON_WM_QUERYDRAGICON()
+ ON_BN_CLICKED(IDC_SELECT_NS, OnSelectNs)
+ ON_WM_SIZE()
+ //}}AFX_MSG_MAP
+ ON_WM_GETMINMAXINFO()
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CNamingViewerDlg message handlers
+
+BOOL CNamingViewerDlg::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+ // Add "About..." menu item to system menu.
+
+ // IDM_ABOUTBOX must be in the system command range.
+ ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
+ ASSERT(IDM_ABOUTBOX < 0xF000);
+
+ CMenu* pSysMenu = GetSystemMenu(FALSE);
+ if (pSysMenu != NULL)
+ {
+ CString strAboutMenu;
+ strAboutMenu.LoadString(IDS_ABOUTBOX);
+ if (!strAboutMenu.IsEmpty())
+ {
+ pSysMenu->AppendMenu(MF_SEPARATOR);
+ pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
+ }
+ }
+
+ // Set the icon for this dialog. The framework does this automatically
+ // when the application's main window is not a dialog
+ SetIcon(m_hIcon, TRUE); // Set big icon
+ SetIcon(m_hIcon, FALSE); // Set small icon
+
+ // TODO: Add extra initialization here
+ m_Tree.SetpORB(m_pORB);
+
+ // Initialize the naming client and get the root context
+ TAO_Naming_Client Client;
+ if(!Client.init(m_pORB))
+ {
+ m_RootContext = Client.get_context();
+ m_Server = "Default";
+ // For debugging, sets up some initial contexts in the NS
+ /*
+ CosNaming::Name Name;
+ Name.length(1);
+ Name[0].id = CORBA::string_dup("test");
+ CORBA::Object_var Object = CORBA::Object::_nil();
+ m_RootContext->rebind(Name, Object);
+ CosNaming::NamingContext_var Context = m_RootContext->new_context();
+ Name[0].id = CORBA::string_dup("test context");
+ m_RootContext->rebind_context(Name, Context);
+ Context->rebind_context(Name, Context);
+ */
+ }
+ Resolve();
+ UpdateData(FALSE);
+ return TRUE; // return TRUE unless you set the focus to a control
+}
+
+void CNamingViewerDlg::OnSysCommand(UINT nID, LPARAM lParam)
+{
+ if ((nID & 0xFFF0) == IDM_ABOUTBOX)
+ {
+ CAboutDlg dlgAbout;
+ dlgAbout.DoModal();
+ }
+ else
+ {
+ CDialog::OnSysCommand(nID, lParam);
+ }
+}
+
+// If you add a minimize button to your dialog, you will need the code below
+// to draw the icon. For MFC applications using the document/view model,
+// this is automatically done for you by the framework.
+
+void CNamingViewerDlg::OnPaint()
+{
+ if (IsIconic())
+ {
+ CPaintDC dc(this); // device context for painting
+
+ SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
+
+ // Center icon in client rectangle
+ int cxIcon = GetSystemMetrics(SM_CXICON);
+ int cyIcon = GetSystemMetrics(SM_CYICON);
+ CRect rect;
+ GetClientRect(&rect);
+ int x = (rect.Width() - cxIcon + 1) / 2;
+ int y = (rect.Height() - cyIcon + 1) / 2;
+
+ // Draw the icon
+ dc.DrawIcon(x, y, m_hIcon);
+ }
+ else
+ {
+ CDialog::OnPaint();
+ }
+}
+
+// The system calls this to obtain the cursor to display while the user drags
+// the minimized window.
+HCURSOR CNamingViewerDlg::OnQueryDragIcon()
+{
+ return (HCURSOR) m_hIcon;
+}
+
+void CNamingViewerDlg::Resolve()
+{
+ m_Tree.Resolve(m_RootContext);
+}
+
+void CNamingViewerDlg::OnSelectNs()
+{
+ // TODO: Add your control notification handler code here
+ CSelectNSDialog Dialog;
+ if(Dialog.DoModal() != IDOK)
+ {
+ return;
+ }
+ try
+ {
+ CORBA::Object_var Object = m_pORB->string_to_object(Dialog.GetIOR());
+ m_RootContext = CosNaming::NamingContext::_narrow(Object);
+ m_Server = Dialog.GetName();
+ UpdateData(FALSE);
+ Resolve();
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+void CNamingViewerDlg::OnSize(UINT nType, int cx, int cy)
+{
+ CDialog::OnSize(nType, cx, cy);
+ // TODO: Add your message handler code here
+
+ // Resize the tree control
+ if(m_Tree.m_hWnd)
+ {
+ CRect Size;
+ m_Tree.GetWindowRect(Size);
+ ScreenToClient(Size);
+ int Border = Size.left;
+ Size.right = cx - Border;
+ Size.bottom = cy - Border;
+ m_Tree.MoveWindow(Size, TRUE);
+ }
+}
+
+void CNamingViewerDlg::OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI )
+{
+ // Prevent the window from being resized too small
+ CWnd* pSelect = GetDlgItem(IDC_NS);
+ if(pSelect)
+ {
+ CRect Size;
+ pSelect->GetWindowRect(Size);
+ ScreenToClient(Size);
+ lpMMI->ptMinTrackSize.x = Size.right + Size.left + 7;
+ lpMMI->ptMinTrackSize.y = 200;
+ }
+}
diff --git a/TAO/utils/NamingViewer/NamingViewerDlg.h b/TAO/utils/NamingViewer/NamingViewerDlg.h
new file mode 100644
index 00000000000..fbda6676e4d
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingViewerDlg.h
@@ -0,0 +1,61 @@
+// $Id$
+// NamingViewerDlg.h : header file
+//
+
+#if !defined(AFX_NAMINGVIEWERDLG_H__B9C0EB98_AD28_11D3_BF1F_00C0F03C565A__INCLUDED_)
+#define AFX_NAMINGVIEWERDLG_H__B9C0EB98_AD28_11D3_BF1F_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "orbsvcs/CosNamingC.h"
+#include "NamingTreeCtrl.h"
+/////////////////////////////////////////////////////////////////////////////
+// CNamingViewerDlg dialog
+
+class CNamingViewerDlg : public CDialog
+{
+// Construction
+public:
+ CNamingViewerDlg(CORBA::ORB_ptr pORB, CWnd* pParent = NULL); // standard constructor
+
+// Dialog Data
+ //{{AFX_DATA(CNamingViewerDlg)
+ enum { IDD = IDD_NAMINGVIEWER_DIALOG };
+ CNamingTreeCtrl m_Tree;
+ CString m_Server;
+ //}}AFX_DATA
+
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CNamingViewerDlg)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+ HICON m_hIcon;
+
+ // Generated message map functions
+ //{{AFX_MSG(CNamingViewerDlg)
+ virtual BOOL OnInitDialog();
+ afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
+ afx_msg void OnPaint();
+ afx_msg HCURSOR OnQueryDragIcon();
+ afx_msg void OnSelectNs();
+ afx_msg void OnSize(UINT nType, int cx, int cy);
+ //}}AFX_MSG
+ afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
+ DECLARE_MESSAGE_MAP()
+
+ void Resolve();
+
+ CORBA::ORB_ptr m_pORB;
+ CosNaming::NamingContext_var m_RootContext;
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_NAMINGVIEWERDLG_H__B9C0EB98_AD28_11D3_BF1F_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/README b/TAO/utils/NamingViewer/README
new file mode 100644
index 00000000000..000c94ad24e
--- /dev/null
+++ b/TAO/utils/NamingViewer/README
@@ -0,0 +1,74 @@
+$Id$
+
+This directory contains an MFC-based CosNaming viewer that that allows
+users to manipulate a Naming Context visually.
+
+Features
+--------
+
+ . Displays the entries of a naming context graphically in a
+ tree control.
+
+ . Supports configuration of different naming servers.
+ Configuration is stored in the registry.
+
+ . Double clicking on an object in the tree will open a dialog to
+ examine the object reference. This dialog will display the
+ stringified object reference, repository ID and profile
+ information.
+
+ . Supports binding, unbinding, context creation and context
+ destroying. User the right mouse button to pull up the
+ context menu.
+
+ . Supports iterator returned from listing a context
+
+ . Initializes ORB with the command line arguments passed into
+ the executable.
+
+ . Supports resizing of the main window.
+
+ . Control-c copies the IOR of the currently selected object to
+ the clipboard.
+
+TO-DO List
+----------
+
+ . Add support for showing the components in an IOR's profile
+ (need a patch in TAO before we can do this).
+
+ . Display the object key for a profile.
+
+ . Add support for recursive destroys of contexts.
+
+ . Add support for "pingable" objects. Pingable objects would
+ be pinged and the viewer could then graphically display
+ those objects that were "alive" and those that were not
+ available.
+
+ . Add configuration options like number of objects to fetch
+ per list, auto expanding of the tree, default naming
+ service, etc.
+
+ . Add support for cutting/moving/copying objects in the tree?
+
+ . Add ability to configure what is displayed for each entry in
+ a context.
+
+ . Right now its just the id and kind, but we could also add in
+ the repository id and primary profile.
+
+Issues/Bugs
+-----------
+
+ . Need to find a better way of displaying the kind attribute
+ in a Name. Right now we use "." which is ambiguous.
+ Perhaps a different color?
+
+ . Consider getting rid of the Select NS button and the name of
+ the name service from the main window. Put the name of the
+ server in the window title and allow the user to select a
+ new NS from the system menu.
+
+If you have any questions, please contact the author, Chris Hafey
+<chris@stentorsoft.com>.
diff --git a/TAO/utils/NamingViewer/SelectNSDialog.cpp b/TAO/utils/NamingViewer/SelectNSDialog.cpp
new file mode 100644
index 00000000000..968ce45c7c7
--- /dev/null
+++ b/TAO/utils/NamingViewer/SelectNSDialog.cpp
@@ -0,0 +1,137 @@
+// $Id$
+// SelectNSDialog.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "NamingViewer.h"
+#include "SelectNSDialog.h"
+#include "AddNameServerDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CSelectNSDialog dialog
+
+
+CSelectNSDialog::CSelectNSDialog(CWnd* pParent /*=NULL*/)
+ : CDialog(CSelectNSDialog::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(CSelectNSDialog)
+ // NOTE: the ClassWizard will add member initialization here
+ //}}AFX_DATA_INIT
+ m_pConfig = 0;
+}
+
+
+void CSelectNSDialog::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CSelectNSDialog)
+ DDX_Control(pDX, IDC_SERVERS, m_Servers);
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CSelectNSDialog, CDialog)
+ //{{AFX_MSG_MAP(CSelectNSDialog)
+ ON_BN_CLICKED(IDC_ADD, OnAdd)
+ ON_BN_CLICKED(IDC_REMOVE, OnRemove)
+ ON_WM_DESTROY()
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CSelectNSDialog message handlers
+
+void CSelectNSDialog::OnOK()
+{
+ // TODO: Add extra validation here
+ int index = m_Servers.GetCurSel();
+ if(index == LB_ERR)
+ {
+ AfxMessageBox("You must select a server or cancel");
+ return;
+ }
+ char* pIOR = (char*)m_Servers.GetItemData(index);
+ m_IOR = pIOR;
+ m_Servers.GetText(index, m_Name);
+ CDialog::OnOK();
+}
+
+void CSelectNSDialog::OnAdd()
+{
+ // TODO: Add your control notification handler code here
+ CAddNameServerDlg Dialog;
+ if(Dialog.DoModal() != IDOK)
+ {
+ return;
+ }
+ ACE_Configuration_Section_Key Section = m_pConfig->root_section();
+ ACE_TString Value = Dialog.m_IOR;
+ m_pConfig->set_string_value(Section, Dialog.m_Name, Value);
+ int pos = m_Servers.AddString(Dialog.m_Name);
+ char* pIOR = new char[Value.length() + 1];
+ strcpy(pIOR, Value.c_str());
+ m_Servers.SetItemData(pos, (DWORD)pIOR);
+
+}
+
+void CSelectNSDialog::OnRemove()
+{
+ // TODO: Add your control notification handler code here
+ int index = m_Servers.GetCurSel();
+ if(index == LB_ERR)
+ {
+ return;
+ }
+ delete (char*)m_Servers.GetItemData(index);
+ CString Name;
+ m_Servers.GetText(index, Name);
+ ACE_Configuration_Section_Key Section = m_pConfig->root_section();;
+ m_pConfig->remove_value(Section, Name);
+ m_Servers.DeleteString(index);
+}
+
+BOOL CSelectNSDialog::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+ // TODO: Add extra initialization here
+ HKEY hKey = ACE_Configuration_Win32Registry::resolve_key(HKEY_LOCAL_MACHINE, "Software\\TAO\\NamingViewer\\Servers");
+ m_pConfig = new ACE_Configuration_Win32Registry(hKey);
+ ACE_Configuration_Section_Key Section = m_pConfig->root_section();;
+ int index = 0;
+ ACE_TString name;
+ ACE_Configuration::VALUETYPE type;
+ while(m_pConfig->enumerate_values(Section, index, name, type) == 0)
+ {
+ ACE_TString value;
+ if(m_pConfig->get_string_value(Section, name.c_str(), value) == 0)
+ {
+ int pos = m_Servers.AddString(name.c_str());
+ char* pIOR = new char[value.length() + 1];
+ strcpy(pIOR, value.c_str());
+ m_Servers.SetItemData(pos, (DWORD)pIOR);
+ }
+ index++;
+ }
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void CSelectNSDialog::OnDestroy()
+{
+ CDialog::OnDestroy();
+
+ // TODO: Add your message handler code here
+ int count = m_Servers.GetCount();
+ for(int i=0; i < count; i++)
+ {
+ delete (char*)m_Servers.GetItemData(i);
+ }
+}
diff --git a/TAO/utils/NamingViewer/SelectNSDialog.h b/TAO/utils/NamingViewer/SelectNSDialog.h
new file mode 100644
index 00000000000..28d3520a9be
--- /dev/null
+++ b/TAO/utils/NamingViewer/SelectNSDialog.h
@@ -0,0 +1,58 @@
+// $Id$
+#if !defined(AFX_SELECTNSDIALOG_H__2AF5C353_B440_11D3_BF2C_00C0F03C565A__INCLUDED_)
+#define AFX_SELECTNSDIALOG_H__2AF5C353_B440_11D3_BF2C_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// SelectNSDialog.h : header file
+//
+#include "ace/Configuration.h"
+
+/////////////////////////////////////////////////////////////////////////////
+// CSelectNSDialog dialog
+
+class CSelectNSDialog : public CDialog
+{
+// Construction
+public:
+ CSelectNSDialog(CWnd* pParent = NULL); // standard constructor
+
+// Dialog Data
+ //{{AFX_DATA(CSelectNSDialog)
+ enum { IDD = IDD_SELECT_NS };
+ CListBox m_Servers;
+ //}}AFX_DATA
+
+ const CString& GetIOR() const {return m_IOR;};
+ const CString& GetName() const {return m_Name;};
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CSelectNSDialog)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+
+ // Generated message map functions
+ //{{AFX_MSG(CSelectNSDialog)
+ virtual void OnOK();
+ afx_msg void OnAdd();
+ afx_msg void OnRemove();
+ virtual BOOL OnInitDialog();
+ afx_msg void OnDestroy();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+
+
+ ACE_Configuration_Win32Registry* m_pConfig;
+ CString m_IOR;
+ CString m_Name;
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_SELECTNSDIALOG_H__2AF5C353_B440_11D3_BF2C_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/StdAfx.cpp b/TAO/utils/NamingViewer/StdAfx.cpp
new file mode 100644
index 00000000000..80fcb464de7
--- /dev/null
+++ b/TAO/utils/NamingViewer/StdAfx.cpp
@@ -0,0 +1,9 @@
+// $Id$
+// stdafx.cpp : source file that includes just the standard includes
+// NamingViewer.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+
+
diff --git a/TAO/utils/NamingViewer/StdAfx.h b/TAO/utils/NamingViewer/StdAfx.h
new file mode 100644
index 00000000000..a5806cbee3b
--- /dev/null
+++ b/TAO/utils/NamingViewer/StdAfx.h
@@ -0,0 +1,29 @@
+// $Id$
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__B9C0EB9A_AD28_11D3_BF1F_00C0F03C565A__INCLUDED_)
+#define AFX_STDAFX_H__B9C0EB9A_AD28_11D3_BF1F_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+
+#include <afxwin.h> // MFC core and standard components
+#include <afxext.h> // MFC extensions
+#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include "tao/corba.h"
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+
+#endif // !defined(AFX_STDAFX_H__B9C0EB9A_AD28_11D3_BF1F_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/ViewIORDialog.cpp b/TAO/utils/NamingViewer/ViewIORDialog.cpp
new file mode 100644
index 00000000000..751b1758aac
--- /dev/null
+++ b/TAO/utils/NamingViewer/ViewIORDialog.cpp
@@ -0,0 +1,156 @@
+// $Id$
+// ViewIORDialog.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "NamingViewer.h"
+#include "ViewIORDialog.h"
+#include "tao/IIOP_Profile.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// ViewIORDialog dialog
+
+
+ViewIORDialog::ViewIORDialog(CORBA::ORB_ptr pORB, CORBA::Object_ptr pObject, CWnd* pParent /*=NULL*/)
+ : CDialog(ViewIORDialog::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(ViewIORDialog)
+ m_TypeID = _T("");
+ m_IOR = _T("");
+ //}}AFX_DATA_INIT
+ m_pORB = pORB;
+ if(pObject)
+ {
+ m_Object = CORBA::Object::_duplicate(pObject);
+ }
+ CORBA::String_var IOR = pORB->object_to_string(pObject);
+ m_IOR = IOR;
+}
+
+
+void ViewIORDialog::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(ViewIORDialog)
+ DDX_Control(pDX, IDC_PROFILES, m_Profiles);
+ DDX_Text(pDX, IDC_TYPE_ID, m_TypeID);
+ DDX_Text(pDX, IDC_IOR, m_IOR);
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(ViewIORDialog, CDialog)
+ //{{AFX_MSG_MAP(ViewIORDialog)
+ ON_BN_CLICKED(IDC_APPLY, OnApply)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// ViewIORDialog message handlers
+
+BOOL ViewIORDialog::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+ // TODO: Add extra initialization here
+ DecodeIOR();
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void ViewIORDialog::OnApply()
+{
+ // TODO: Add your control notification handler code here
+ UpdateData();
+ try
+ {
+ m_Object = m_pORB->string_to_object(m_IOR);
+ DecodeIOR();
+ }
+ catch(CORBA::Exception& ex)
+ {
+ MessageBox(ex._id(), "CORBA::Exception");
+ }
+}
+
+void ViewIORDialog::DecodeIOR()
+{
+ // Reset the fields
+ m_Profiles.DeleteAllItems();
+ m_TypeID = "";
+ UpdateData(FALSE);
+
+ // if object is nil, return out
+ if(CORBA::is_nil(m_Object))
+ {
+ return;
+ }
+
+ // Get the stub
+ TAO_Stub* pStub = m_Object->_stubobj();
+ const char* pType = pStub->type_id;
+ m_TypeID = pType ? pType : ""; // special case for INS objects, tao doesn't get the type id
+ UpdateData(FALSE);
+
+ // Iterate through each profile and add an entry to the tree control
+ const TAO_MProfile& BaseProfiles= pStub->base_profiles();
+ CORBA::ULong Count = BaseProfiles.profile_count();
+ for(CORBA::ULong Slot = 0; Slot < Count; Slot++)
+ {
+ const TAO_Profile* pProfile = BaseProfiles.get_profile(Slot);
+ HTREEITEM hProfile;
+ switch(pProfile->tag())
+ {
+ case 0://IOP::TAG_INTERNET_IOP:
+ {
+ TAO_IIOP_Profile* pIIOPProfile = (TAO_IIOP_Profile*)pProfile;
+ CString ProfileString;
+ ProfileString.Format("IOP %d.%d@%s:%d",
+ pIIOPProfile->version().major,
+ pIIOPProfile->version().minor,
+ pIIOPProfile->host(),
+ pIIOPProfile->port());
+ hProfile = m_Profiles.InsertItem(ProfileString);
+ }
+ break;
+ default:
+ {
+ CString ProfileString;
+ ProfileString.Format("Unknown %X", pProfile->tag());
+ hProfile = m_Profiles.InsertItem(ProfileString);
+ }
+ break;
+ }
+
+ // XXX Add in the components
+ //const TAO_Tagged_Components& Compoents = pProfile->tagged_components();
+
+ }
+/*
+ TAO_ObjectKey* pKey = pIIOPP->_key();
+ if(pKey)
+ {
+ m_TextKey.resize(pKey->length() + 1);
+ for(int i=0; i < pKey->length(); i++)
+ {
+ if(isprint((*pKey)[i]))
+ {
+ m_TextKey[i] = (*pKey)[i];
+ }
+ else
+ {
+ m_TextKey[i] = '.';
+ }
+ char Digit[4];
+ sprintf(Digit, "%02X ", (*pKey)[i]);
+ m_HexKey += Digit;
+ }
+ }
+*/
+}
diff --git a/TAO/utils/NamingViewer/ViewIORDialog.h b/TAO/utils/NamingViewer/ViewIORDialog.h
new file mode 100644
index 00000000000..6c29fba45d2
--- /dev/null
+++ b/TAO/utils/NamingViewer/ViewIORDialog.h
@@ -0,0 +1,54 @@
+// $Id$
+#if !defined(AFX_VIEWIORDIALOG_H__A010D782_AF86_11D3_BF23_00C0F03C565A__INCLUDED_)
+#define AFX_VIEWIORDIALOG_H__A010D782_AF86_11D3_BF23_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// ViewIORDialog.h : header file
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// ViewIORDialog dialog
+
+class ViewIORDialog : public CDialog
+{
+// Construction
+public:
+ ViewIORDialog(CORBA::ORB_ptr pORB, CORBA::Object_ptr pObject, CWnd* pParent = NULL); // standard constructor
+
+// Dialog Data
+ //{{AFX_DATA(ViewIORDialog)
+ enum { IDD = IDD_VIEWIOR_DIALOG };
+ CTreeCtrl m_Profiles;
+ CString m_TypeID;
+ CString m_IOR;
+ //}}AFX_DATA
+
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(ViewIORDialog)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+
+ // Generated message map functions
+ //{{AFX_MSG(ViewIORDialog)
+ virtual BOOL OnInitDialog();
+ afx_msg void OnApply();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+
+ void DecodeIOR();
+
+ CORBA::Object_var m_Object;
+ CORBA::ORB_ptr m_pORB;
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_VIEWIORDIALOG_H__A010D782_AF86_11D3_BF23_00C0F03C565A__INCLUDED_)
diff --git a/TAO/utils/NamingViewer/res/NamingViewer.ico b/TAO/utils/NamingViewer/res/NamingViewer.ico
new file mode 100644
index 00000000000..878ca59f85d
--- /dev/null
+++ b/TAO/utils/NamingViewer/res/NamingViewer.ico
Binary files differ
diff --git a/TAO/utils/NamingViewer/res/NamingViewer.rc2 b/TAO/utils/NamingViewer/res/NamingViewer.rc2
new file mode 100644
index 00000000000..196a5f10a56
--- /dev/null
+++ b/TAO/utils/NamingViewer/res/NamingViewer.rc2
@@ -0,0 +1,13 @@
+//
+// NAMINGVIEWER.RC2 - resources Microsoft Visual C++ does not edit directly
+//
+
+#ifdef APSTUDIO_INVOKED
+ #error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Add manually edited resources here...
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/TAO/utils/NamingViewer/resource.h b/TAO/utils/NamingViewer/resource.h
new file mode 100644
index 00000000000..d2788078a96
--- /dev/null
+++ b/TAO/utils/NamingViewer/resource.h
@@ -0,0 +1,52 @@
+// $Id$
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by NamingViewer.rc
+//
+#define IDM_ABOUTBOX 0x0010
+#define IDD_ABOUTBOX 100
+#define IDS_ABOUTBOX 101
+#define IDD_NAMINGVIEWER_DIALOG 102
+#define IDR_MAINFRAME 128
+#define IDD_VIEWIOR_DIALOG 129
+#define IDR_CONTEXT_POPUP 131
+#define IDR_OBJECT_POPUP 132
+#define IDD_BIND 133
+#define IDD_BIND_NEW_CONTEXT 134
+#define IDD_SELECT_NS 135
+#define IDD_ADD_NAME_SERVER 136
+#define IDC_TREE 1000
+#define IDC_IOR 1002
+#define IDC_TYPE_ID 1007
+#define IDC_APPLY 1011
+#define IDC_PROFILES 1012
+#define IDC_SELECT_NS 1013
+#define IDC_SERVER 1014
+#define IDC_ID 1015
+#define IDC_KIND 1017
+#define IDC_VIEWIOR 1018
+#define IDC_ADD 1022
+#define IDC_REMOVE 1023
+#define IDC_SERVERS 1024
+#define IDC_NAME 1025
+#define IDC_NS 1027
+#define ID_CONTEXT_POPUP_BIND_CONTEXT 32771
+#define ID_CONTEXT_POPUP_DESTROY 32772
+#define ID_CONTEXT_POPUP_VIEWREFERENCE 32773
+#define ID_CONTEXT_POPUP_REFRESH 32774
+#define ID_OBJECTPOPUP_UNBIND 32775
+#define ID_OBJECTPOPUP_VIEWREFRENCE 32776
+#define ID_CONTEXT_POPUP_UNBIND 32777
+#define ID_CONTEXT_POPUP_BINDOBJECT 32778
+#define ID_CONTEXTPOPUP_BINDNEWCONTEXT 32779
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 138
+#define _APS_NEXT_COMMAND_VALUE 32782
+#define _APS_NEXT_CONTROL_VALUE 1028
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/TAO/utils/README b/TAO/utils/README
index 1f17904c9cb..2660043e9d9 100644
--- a/TAO/utils/README
+++ b/TAO/utils/README
@@ -11,3 +11,8 @@ with TAO.
. nslist -- This utility lists the current entries in the
Naming Service in a nicely formatter manner.
+
+ . NamingViewer -- This utility is an MFC-based CosNaming
+ viewer that allows users to manipulate a Naming Context
+ visually.
+