$Id$

Normally, a typecode is created at compile time by the
IDL compiler for each declaration in an IDL file, or at
runtime by the  Interface Repository. However, in some
situations, such as a bridge between ORBs, a typecode may
have to be  created without any knowledge of the IDL and outside
any Interface Repository. In such cases, the typecode
creation methods of the pseudo-object CORBA::ORB are used.

This program is a simple example of the use of the
CORBA::ORB::create_*_tc methods. It does not require any
queries to the Interface Repository (although for a more
elaborate example, this may be necessary). It does, however,
use IFR data types, so the program must be linked to the
IFR_Client library. For examples of queries on the Interface
Repository, see the tests in
ACE_ROOT/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test and
ACE_ROOT/TAO/orbsvcs/tests/InterfaceRepo/Application_Test.

These typecode creation methods make use of the functions
of the same name in TypeCodeFactory (proposed, but not yet
officially part of the CORBA spec). The TAO_TypeCodeFactory
library is found in ACE_ROOT/TAO/tao/TypeCodeFactory, and
is used by the Interface Repository as well as by
CORBA::ORB::create_*_tc to create typecodes. This library
may be compiled, but, to keep dependencies and footprint
to a minimum, it is not linked and loaded automatically.
If an application makes use of one or more of the
CORBA::ORB typecode creation methods, the application must
contain the line

#include "<path>/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.h"

and link the TAO_TypeCodeFactory library. The #inlcude line
will automatically load the library for linking, if it has
been compiled. If this is not done, null typecode pointers
will be returned from the method calls.

The typecode created by the test should be identical to the
one created by the IDL compiler from the included test.idl file.
The test checks for this equality, and outputs an error if the
two are not equal. The executable name is create_tc. It can
be run either from the command line or by the Perl script
run_test.pl.

For more information about the TypeCodeFactory and the Interface
Repository, see ACE_ROOT/TAO/docs/releasenotes/index.html.
