diff options
Diffstat (limited to 'TAO/tao/ORB.h')
-rw-r--r-- | TAO/tao/ORB.h | 730 |
1 files changed, 96 insertions, 634 deletions
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h index d9f5502157a..1b11bcc712e 100644 --- a/TAO/tao/ORB.h +++ b/TAO/tao/ORB.h @@ -10,7 +10,7 @@ // ORB.h // // = DESCRIPTION -// Header file for CORBA's <ORB> type and <CORBA> type. +// Header file for CORBA's <ORB> type and type. // // = AUTHOR // Copyright 1994-1995 by Sun Microsystems Inc. and Douglas C. Schmidt. @@ -18,19 +18,10 @@ // ============================================================================ #ifndef TAO_ORB_H -# define TAO_ORB_H +#define TAO_ORB_H -#include "tao/corba.h" - -// ObjectIds recognized by CORBA_ORB::resolve_initial_references ()... -// of course, no guarantees are made that the call will return -// something useful. -#define TAO_OBJID_NAMESERVICE "NameService" -#define TAO_OBJID_TRADINGSERVICE "TradingService" -#define TAO_OBJID_ROOTPOA "RootPOA" -#define TAO_DEFAULT_ROOTPOA_NAME "" -#define TAO_OBJID_POACURRENT "POACurrent" -#define TAO_OBJID_INTERFACEREP "InterfaceRepository" +#include "tao/corbafwd.h" +#include "tao/Exception.h" typedef enum { @@ -68,107 +59,6 @@ typedef enum class TAO_POA_Manager; class TAO_POA_Policies; -class CORBA_Any; -class CORBA_Any_var; -class CORBA_Any_out; -//typedef class CORBA_Any *CORBA_Any_ptr; - -class CORBA_TypeCode; -class CORBA_TypeCode_var; -class CORBA_TypeCode_out; -//typedef class CORBA_TypeCode *CORBA_TypeCode_ptr; - -class CORBA_Exception; -//typedef class CORBA_Exception *CORBA_Exception_ptr; - -class CORBA_Request; -class CORBA_Request_var; -class CORBA_Request_out; -//typedef class CORBA_Request *CORBA_Request_ptr; - -class CORBA_NamedValue; -class CORBA_NamedValue_var; -class CORBA_NamedValue_out; -//typedef class CORBA_NamedValue *CORBA_NamedValue_ptr; - -class CORBA_NVList; -class CORBA_NVList_var; -class CORBA_NVList_out; -//typedef class CORBA_NVList *CORBA_NVList_ptr; - -class CORBA_ORB; -class CORBA_ORB_var; -class CORBA_ORB_out; -//typedef class CORBA_ORB *CORBA_ORB_ptr; - -class CORBA_Object; -class CORBA_Object_var; -class CORBA_Object_out; -//typedef class CORBA_Object *CORBA_Object_ptr; - -class CORBA_ServerRequest; -//typedef class CORBA_ServerRequest *CORBA_ServerRequest_ptr; - -class CORBA_Environment; -//typedef class CORBA_Environment *CORBA_Environment_ptr; - -class CORBA_Principal; -//typedef class CORBA_Principal *CORBA_Principal_ptr; - -class CORBA_SystemException; -class CORBA_UserException; - -class CORBA_Policy; -class CORBA_Policy_var; -class CORBA_Policy_out; - -class CORBA_PolicyList; -class CORBA_PolicyList_var; -class CORBA_PolicyList_out; - -class CORBA_Current; -class CORBA_Current_var; -class CORBA_Current_out; - -// forward declarations of system exceptions -#define TAO_SYSTEM_EXCEPTION(name) class CORBA_ ## name - -TAO_SYSTEM_EXCEPTION(UNKNOWN); -TAO_SYSTEM_EXCEPTION(BAD_PARAM); -TAO_SYSTEM_EXCEPTION(NO_MEMORY); -TAO_SYSTEM_EXCEPTION(IMP_LIMIT); -TAO_SYSTEM_EXCEPTION(COMM_FAILURE); -TAO_SYSTEM_EXCEPTION(INV_OBJREF); -TAO_SYSTEM_EXCEPTION(OBJECT_NOT_EXIST); -TAO_SYSTEM_EXCEPTION(NO_PERMISSION); -TAO_SYSTEM_EXCEPTION(INTERNAL); -TAO_SYSTEM_EXCEPTION(MARSHAL); -TAO_SYSTEM_EXCEPTION(INITIALIZE); -TAO_SYSTEM_EXCEPTION(NO_IMPLEMENT); -TAO_SYSTEM_EXCEPTION(BAD_TYPECODE); -TAO_SYSTEM_EXCEPTION(BAD_OPERATION); -TAO_SYSTEM_EXCEPTION(NO_RESOURCES); -TAO_SYSTEM_EXCEPTION(NO_RESPONSE); -TAO_SYSTEM_EXCEPTION(PERSIST_STORE); -TAO_SYSTEM_EXCEPTION(BAD_INV_ORDER); -TAO_SYSTEM_EXCEPTION(TRANSIENT); -TAO_SYSTEM_EXCEPTION(FREE_MEM); -TAO_SYSTEM_EXCEPTION(INV_IDENT); -TAO_SYSTEM_EXCEPTION(INV_FLAG); -TAO_SYSTEM_EXCEPTION(INTF_REPOS); -TAO_SYSTEM_EXCEPTION(BAD_CONTEXT); -TAO_SYSTEM_EXCEPTION(OBJ_ADAPTER); -TAO_SYSTEM_EXCEPTION(DATA_CONVERSION); -#undef TAO_SYSTEM_EXCEPTION - -class CORBA_UnknownUserException; - -typedef class CORBA_ImplementationDef * - CORBA_ImplementationDef_ptr; - -typedef class CORBA_InterfaceDef * - CORBA_InterfaceDef_ptr; - // =Forward declarations struct TAO_Dispatch_Context; class TAO_Operation_Table; @@ -181,552 +71,126 @@ class TAO_OutputCDR; // The new (POA) base class for servants. class TAO_ServantBase; -// enum values defined in nvlist.h, bitwise ORed. -typedef u_int CORBA_Flags; - -// This and the other CORBA IDL types below are -// typedef'd to the corresponding CDR types -// already defined in ACE. -typedef CDR::Boolean CORBA_Boolean; - - typedef struct TAO_Leader_Follower_Info_Struct - { - ACE_SYNCH_MUTEX leader_follower_lock_; - // do protect the access to the following three members - - ACE_Unbounded_Set<ACE_SYNCH_CONDITION *> follower_set_; - // keep a set of followers around (protected) - - int leaders_; - // 0 if no leader is around, 1 if there is a leader - // > 1 if we do nested upcalls (protected) - - ACE_thread_t leader_thread_ID_; - // thread ID of the leader thread (protected) - } TAO_Leader_Follower_Info; - +typedef struct TAO_Leader_Follower_Info_Struct +{ + ACE_SYNCH_MUTEX leader_follower_lock_; + // do protect the access to the following three members + + ACE_Unbounded_Set<ACE_SYNCH_CONDITION *> follower_set_; + // keep a set of followers around (protected) + + int leaders_; + // 0 if no leader is around, 1 if there is a leader + // > 1 if we do nested upcalls (protected) + + ACE_thread_t leader_thread_ID_; + // thread ID of the leader thread (protected) +} TAO_Leader_Follower_Info; -// forward declare sequences. -template <class T> class TAO_Unbounded_Sequence; -template <class T> class TAO_Unbounded_Object_Sequence; +class STUB_Object; +// Forward declarations. -class TAO_Export CORBA +class TAO_Export CORBA_String_var { // = TITLE - // Provides the CORBA namespace. - // - // = DESCRIPTION - // This class allows the use of CORBA::Foo, as well as CORBA_Foo - // for all standard types Foo. + // CORBA_String var class. Provides automatic deallocation of storage + // for the string once it goes out of scope. public: + CORBA_String_var (void); + // default constructor. - typedef CORBA_Boolean Boolean; - typedef Boolean &Boolean_out; - // Out type for boolean. - -// This and the other CORBA IDL types below are -// typedef'd to the corresponding CDR types -// already defined in ACE. - typedef CDR::Octet Octet; - typedef Octet &Octet_out; - // Out type for octet. - - typedef CDR::Short Short; - typedef Short &Short_out; - // Out type for Short. - - typedef CDR::UShort UShort; - typedef UShort &UShort_out; - // Out type for UShort. - - // = CORBA "Long" (and its unsigned cousin) are 32 bits. - typedef CDR::Long Long; - typedef CDR::ULong ULong; - - // 94-9-32 Appendix A, also the OMG C++ mapping, stipulate that 64 - // bit integers are "LongLong". - typedef Long &Long_out; - // Out type for long. - - typedef ULong &ULong_out; - // Out type for unsigned long. - - // = The following are IDL extensions, not yet standard. - - typedef CDR::LongLong LongLong; - typedef CDR::ULongLong ULongLong; - - typedef LongLong &LongLong_out; - // Out type for long long. - - typedef ULongLong &ULongLong_out; - // Out type for unsigned long long. - - typedef CDR::Float Float; - typedef Float &Float_out; // out type for float + CORBA_String_var (char *p); + // constructor, owns p. - typedef CDR::Double Double; - typedef Double &Double_out; - // Out type for double. + CORBA_String_var (const char *p); + // constructor. Makes a copy of p. - // 94-9-32 Appendix A defines a 128 bit floating point "long double" - // data type, with greatly extended precision and four more bits of - // exponent (compared to "double"). This is an IDL extension, not - // yet standard. + CORBA_String_var (const CORBA_String_var &s); + // copy constructor. - typedef CDR::LongDouble LongDouble; - typedef LongDouble &LongDouble_out; - // Out type for long doubles. + ~CORBA_String_var (void); + // destructor. - typedef CDR::Char Char; - typedef Char &Char_out; - // Out type for char. + CORBA_String_var &operator= (char *p); + // assignment operator. - typedef TAO_Unbounded_Sequence<Octet> OctetSeq; + CORBA_String_var &operator= (const char *p); + // assignment to a const char*. Makes a copy. - typedef Char *String; + CORBA_String_var &operator= (const CORBA_String_var &s); + // assignment operator. - // = String memory management. - static String string_alloc (ULong len); - static String string_copy (const Char *); - static String string_dup (const Char *); - static void string_free (Char *); + operator char *(); + // access and modify. - class TAO_Export String_var - { - // = TITLE - // String var class. Provides automatic deallocation of storage - // for the string once it goes out of scope. - public: - String_var (void); - // default constructor. - - String_var (char *p); - // constructor, owns p. - - String_var (const char *p); - // constructor. Makes a copy of p. - - String_var (const String_var &s); - // copy constructor. - - ~String_var (void); - // destructor. - - String_var &operator= (char *p); - // assignment operator. + operator const char *() const; + // only read privileges. - String_var &operator= (const char *p); - // assignment to a const char*. Makes a copy. + char &operator[] (CORBA::ULong index); + // allows access and modification using an index. - String_var &operator= (const String_var &s); - // assignment operator. - - operator char *(); - // access and modify. - - operator const char *() const; - // only read privileges. - - char &operator[] (ULong index); - // allows access and modification using an index. - - char operator[] (ULong index) const; - // allows only accessing thru an index. + char operator[] (CORBA::ULong index) const; + // allows only accessing thru an index. // = in, out, out, and _retn operations. // ORBOS/97-05-15, Appendix C.2 - const char *in (void) const; - // for in parameter. - - char *&inout (void); - // for inout parameter. + const char *in (void) const; + // for in parameter. - char *&out (void); - // for out parameter. + char *&inout (void); + // for inout parameter. - char *_retn (void); - // for string of return type. + char *&out (void); + // for out parameter. - private: - char *ptr_; - // instance. - }; + char *_retn (void); + // for string of return type. - class TAO_Export String_out - { - // = TITLE - // String_out - // - // = DESCRIPTION - // To support the memory management for "out" parameter passing - // mode. ORBOS/97-05-15, Appendix C.2 defines a String_out class - public: - // = operations. - - String_out (char *&p); - // Construction from a reference to a string. - - String_out (String_var &p); - // Construction from a var. - - String_out (const String_out &s); - // Copy constructor. - - String_out &operator= (const String_out &s); - // Assignment from a string_out. - - String_out &operator= (char *p); - // Assignment from a string. - - operator char *&(); - // Cast. - - char *&ptr (void); - // Return underlying instance. - - private: - char *&ptr_; - // Instance. - - // assignment from _var disallowed - void operator= (const String_var &); - }; - - // WChar is an IDL extension, not yet standard. We use 32 bits - // because that's what many platforms use for their native wchar_t. - - typedef CDR::WChar WChar; - typedef WChar *WString; - - typedef WChar &WChar_out; - // Out type for WChar. - - // = String memory management routines. - static WString wstring_alloc (ULong len); - static WString wstring_copy (const WChar *const); - static WString wstring_dup (const WChar *const); - static void wstring_free (WChar *const); - - // = various CORBA defined classes. - typedef CORBA_Any Any; - typedef CORBA_Any_var Any_var; - typedef CORBA_Any_out Any_out; - typedef Any *Any_ptr; - - typedef CORBA_Environment Environment; - typedef Environment *Environment_ptr; - - typedef CORBA_Exception Exception; - typedef Exception *Exception_ptr; - - typedef CORBA_NamedValue NamedValue; - typedef NamedValue *NamedValue_ptr; - typedef CORBA_NamedValue_var NamedValue_var; - typedef CORBA_NamedValue_out NamedValue_out; - - typedef CORBA_NVList NVList; - typedef NVList *NVList_ptr; - typedef CORBA_NVList_var NVList_var; - typedef CORBA_NVList_out NVList_out; - - typedef CORBA_Object Object; - typedef CORBA_Object *Object_ptr; - typedef CORBA_Object_var Object_var; - typedef CORBA_Object_out Object_out; - - typedef CORBA_Principal Principal; - typedef CORBA_Principal *Principal_ptr; - - typedef CORBA_ORB ORB; - typedef CORBA_ORB *ORB_ptr; - typedef CORBA_ORB_var ORB_var; - typedef CORBA_ORB_out ORB_out; - - typedef CORBA_Request Request; - typedef Request *Request_ptr; - typedef CORBA_Request_var Request_var; - typedef CORBA_Request_out Request_out; - - typedef CORBA_ServerRequest ServerRequest; - typedef ServerRequest *ServerRequest_ptr; - - typedef CORBA_SystemException SystemException; - - typedef CORBA_TypeCode TypeCode; - typedef TypeCode *TypeCode_ptr; - typedef CORBA_TypeCode_var TypeCode_var; - typedef CORBA_TypeCode_out TypeCode_out; - - typedef CORBA_UserException UserException; - - typedef CORBA_ExceptionList ExceptionList; - typedef CORBA_ExceptionList *ExceptionList_ptr; - - typedef CORBA_ImplementationDef *ImplementationDef_ptr; - - typedef class CORBA_InterfaceDef *InterfaceDef_ptr; - - - typedef CORBA_Policy Policy; - typedef CORBA_Policy *Policy_ptr; - typedef CORBA_Policy_var Policy_var; - typedef CORBA_Policy_out Policy_out; - - typedef CORBA_PolicyList PolicyList; - typedef CORBA_PolicyList_var PolicyList_var; - typedef CORBA_PolicyList_out PolicyList_out; - - typedef CORBA_Current Current; - typedef CORBA_Current *Current_ptr; - typedef CORBA_Current_var Current_var; - typedef CORBA_Current_out Current_out; - - // enum values defined in nvlist.hh, bitwise ORed. - typedef u_int Flags; - - enum CompletionStatus - { - // = Completion Status for System exceptions - - COMPLETED_YES, // successful or exceptional completion - COMPLETED_NO, // didn't change any state; retry is OK - COMPLETED_MAYBE // can't say what happened; retry unsafe - }; - - enum ExceptionType - { - // = Exception type. - - NO_EXCEPTION, - USER_EXCEPTION, - SYSTEM_EXCEPTION - }; +private: + char *ptr_; + // instance. +}; - // all the system exception classes -#define TAO_SYSTEM_EXCEPTION(name) \ - typedef CORBA_ ## name name - TAO_SYSTEM_EXCEPTION(UNKNOWN); - TAO_SYSTEM_EXCEPTION(BAD_PARAM); - TAO_SYSTEM_EXCEPTION(NO_MEMORY); - TAO_SYSTEM_EXCEPTION(IMP_LIMIT); - TAO_SYSTEM_EXCEPTION(COMM_FAILURE); - TAO_SYSTEM_EXCEPTION(INV_OBJREF); - TAO_SYSTEM_EXCEPTION(OBJECT_NOT_EXIST); - TAO_SYSTEM_EXCEPTION(NO_PERMISSION); - TAO_SYSTEM_EXCEPTION(INTERNAL); - TAO_SYSTEM_EXCEPTION(MARSHAL); - TAO_SYSTEM_EXCEPTION(INITIALIZE); - TAO_SYSTEM_EXCEPTION(NO_IMPLEMENT); - TAO_SYSTEM_EXCEPTION(BAD_TYPECODE); - TAO_SYSTEM_EXCEPTION(BAD_OPERATION); - TAO_SYSTEM_EXCEPTION(NO_RESOURCES); - TAO_SYSTEM_EXCEPTION(NO_RESPONSE); - TAO_SYSTEM_EXCEPTION(PERSIST_STORE); - TAO_SYSTEM_EXCEPTION(BAD_INV_ORDER); - TAO_SYSTEM_EXCEPTION(TRANSIENT); - TAO_SYSTEM_EXCEPTION(FREE_MEM); - TAO_SYSTEM_EXCEPTION(INV_IDENT); - TAO_SYSTEM_EXCEPTION(INV_FLAG); - TAO_SYSTEM_EXCEPTION(INTF_REPOS); - TAO_SYSTEM_EXCEPTION(BAD_CONTEXT); - TAO_SYSTEM_EXCEPTION(OBJ_ADAPTER); - TAO_SYSTEM_EXCEPTION(DATA_CONVERSION); -#undef TAO_SYSTEM_EXCEPTION - - typedef CORBA_UnknownUserException UnknownUserException; - - // = all the CORBA::is_nil methods. - static Boolean is_nil (Object_ptr); - static Boolean is_nil (Environment_ptr); - static Boolean is_nil (NamedValue_ptr); - static Boolean is_nil (NVList_ptr); - static Boolean is_nil (Request_ptr); - // static Boolean is_nil (Context_ptr); - static Boolean is_nil (TypeCode_ptr); - static Boolean is_nil (ORB_ptr); - static Boolean is_nil (Principal_ptr); - static Boolean is_nil (ServerRequest_ptr req); - - // = all the CORBA release methods. - static void release (Object_ptr); - static void release (Environment_ptr); - static void release (NamedValue_ptr); - static void release (NVList_ptr); - static void release (Request_ptr); - static void release (Principal_ptr); - // static Boolean release (Context_ptr); - static void release (TypeCode_ptr); - static void release (ORB_ptr); - static void release (ServerRequest_ptr req); - - enum TCKind - { - // = Kinds of typecodes. - - // Do not change these enum values, or duplicate them if you need - // to add values. They are used to index tables, and if you - // change the values you'll need to find and update all of those - // tables. The values are also part of the Common Data - // Representation, and hence are part of IIOP and other ORB - // protocols. - - tk_null = 0, - tk_void = 1, - tk_short = 2, - tk_long = 3, - tk_ushort = 4, - tk_ulong = 5, - tk_float = 6, - tk_double = 7, - tk_boolean = 8, - tk_char = 9, - tk_octet = 10, - tk_any = 11, - tk_TypeCode = 12, - tk_Principal = 13, - tk_objref = 14, - tk_struct = 15, - tk_union = 16, - tk_enum = 17, - tk_string = 18, - tk_sequence = 19, - tk_array = 20, - tk_alias = 21, // 94-11-7 - tk_except = 22, // 94-11-7 - - // = These five are OMG-IDL data type extensions. - tk_longlong = 23, // 94-9-32 Appendix A (+ 2) - tk_ulonglong = 24, // 94-9-32 Appendix A (+ 2) - tk_longdouble = 25, // 94-9-32 Appendix A (+ 2) - tk_wchar = 26, // 94-9-32 Appendix A (+ 2) - tk_wstring = 27, // 94-9-32 Appendix A (+ 2) - - // This symbol is not defined by CORBA 2.0. It's used to speed up - // dispatch based on TCKind values, and lets many important ones - // just be table lookups. It must always be the last enum value!! - - TC_KIND_COUNT - }; +class TAO_Export CORBA_String_out +{ + // = TITLE + // CORBA_String_out + // + // = DESCRIPTION + // To support the memory management for "out" parameter passing + // mode. ORBOS/97-05-15, Appendix C.2 defines a CORBA_String_out class +public: + // = operations. - // All the typecode constants - static TypeCode_ptr _tc_null; - static TypeCode_ptr _tc_void; - static TypeCode_ptr _tc_short; - static TypeCode_ptr _tc_long; - static TypeCode_ptr _tc_ushort; - static TypeCode_ptr _tc_ulong; - static TypeCode_ptr _tc_float; - static TypeCode_ptr _tc_double; - static TypeCode_ptr _tc_boolean; - static TypeCode_ptr _tc_char; - static TypeCode_ptr _tc_octet; - static TypeCode_ptr _tc_any; - static TypeCode_ptr _tc_TypeCode; - static TypeCode_ptr _tc_Principal; - static TypeCode_ptr _tc_Object; - static TypeCode_ptr _tc_string; - // static TypeCode_ptr _tc_alias; - // static TypeCode_ptr _tc_except; - static TypeCode_ptr _tc_longlong; - static TypeCode_ptr _tc_ulonglong; - static TypeCode_ptr _tc_longdouble; - static TypeCode_ptr _tc_wchar; - static TypeCode_ptr _tc_wstring; - - // = Typecode constants for system exceptions. -#define TAO_SYSTEM_EXCEPTION(name) \ - static TypeCode_ptr _tc_ ## name - - TAO_SYSTEM_EXCEPTION(UNKNOWN); - TAO_SYSTEM_EXCEPTION(BAD_PARAM); - TAO_SYSTEM_EXCEPTION(NO_MEMORY); - TAO_SYSTEM_EXCEPTION(IMP_LIMIT); - TAO_SYSTEM_EXCEPTION(COMM_FAILURE); - TAO_SYSTEM_EXCEPTION(INV_OBJREF); - TAO_SYSTEM_EXCEPTION(OBJECT_NOT_EXIST); - TAO_SYSTEM_EXCEPTION(NO_PERMISSION); - TAO_SYSTEM_EXCEPTION(INTERNAL); - TAO_SYSTEM_EXCEPTION(MARSHAL); - TAO_SYSTEM_EXCEPTION(INITIALIZE); - TAO_SYSTEM_EXCEPTION(NO_IMPLEMENT); - TAO_SYSTEM_EXCEPTION(BAD_TYPECODE); - TAO_SYSTEM_EXCEPTION(BAD_OPERATION); - TAO_SYSTEM_EXCEPTION(NO_RESOURCES); - TAO_SYSTEM_EXCEPTION(NO_RESPONSE); - TAO_SYSTEM_EXCEPTION(PERSIST_STORE); - TAO_SYSTEM_EXCEPTION(BAD_INV_ORDER); - TAO_SYSTEM_EXCEPTION(TRANSIENT); - TAO_SYSTEM_EXCEPTION(FREE_MEM); - TAO_SYSTEM_EXCEPTION(INV_IDENT); - TAO_SYSTEM_EXCEPTION(INV_FLAG); - TAO_SYSTEM_EXCEPTION(INTF_REPOS); - TAO_SYSTEM_EXCEPTION(BAD_CONTEXT); - TAO_SYSTEM_EXCEPTION(OBJ_ADAPTER); - TAO_SYSTEM_EXCEPTION(DATA_CONVERSION); -#undef TAO_SYSTEM_EXCEPTION - - static TypeCode_ptr _tc_UnknownUserException; - - static ORB_ptr ORB_init (int &argc, - char *const *argv, - const char *orb_name = 0, - Environment &TAO_IN_ENV = CORBA_Environment::default_environment ()); - // ORB initialisation, per OMG document 94-9-46. - - // = The following two methods are TAO-specific extensions. - static ORB_ptr instance (void); - // Returns a pointer to the "default ORB." - - static void instance (ORB_ptr); - // Sets a pointer to the "default ORB." - - enum - { - // = Define flags for NVList add methods + CORBA_String_out (char *&p); + // Construction from a reference to a string. - ARG_IN = 0x01, - ARG_OUT = 0x02, - ARG_INOUT = 0x04, - IN_COPY_VALUE = 0x08, - OUT_LIST_MEMORY = 0x10 - }; + CORBA_String_out (CORBA_String_var &p); + // Construction from a var. - static CORBA::TypeCode_ptr _tc_Policy; - static CORBA::TypeCode_ptr _tc_PolicyList; + CORBA_String_out (const CORBA_String_out &s); + // Copy constructor. - static CORBA::TypeCode_ptr _tc_Current; + CORBA_String_out &operator= (const CORBA_String_out &s); + // Assignment from a string_out. - typedef char *Identifier; - typedef CORBA::String_var Identifier_var; - typedef CORBA::String_out Identifier_out; - static CORBA::TypeCode_ptr _tc_Identifier; + CORBA_String_out &operator= (char *p); + // Assignment from a string. - typedef char *RepositoryId; - typedef CORBA::String_var RepositoryId_var; - typedef CORBA::String_out RepositoryId_out; - static CORBA::TypeCode_ptr _tc_RepositoryId; + operator char *&(); + // Cast. - typedef CORBA::ULong PolicyType; - typedef CORBA::ULong_out PolicyType_out; - static CORBA::TypeCode_ptr _tc_PolicyType; + char *&ptr (void); + // Return underlying instance. private: - friend class CORBA_ORB; - static ORB_ptr instance_; - // Points to the "default ORB." -}; // end of class (namespace) CORBA - -#include "tao/Exception.h" -#include "tao/Managed_Types.h" -#include "tao/Sequence.h" -#include "tao/Sequence_T.h" -#include "tao/Object_KeyC.h" -#include "tao/Union.h" + char *&ptr_; + // Instance. -class STUB_Object; -// Forward declarations. + // assignment from _var disallowed + void operator= (const CORBA_String_var &); +}; class TAO_Export CORBA_ORB { @@ -766,12 +230,12 @@ public: // can be used for initialization or in comparisons. virtual CORBA::Object_ptr string_to_object (const char *str, - CORBA_Environment &TAO_IN_ENV = CORBA_Environment::default_environment ()) = 0; + CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ()) = 0; // Turn a string-ified object reference back into an object pointer. // Each type of ORB, e.g. an IIOP ORB, must implement this. // Typically these strings are created using <object_to_string()>. virtual CORBA::String object_to_string (CORBA::Object_ptr obj, - CORBA_Environment &TAO_IN_ENV = CORBA_Environment::default_environment ()) = 0; + CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ()) = 0; // Turn an object reference into a string. Each type of ORB, // e.g. an IIOP ORB, must implement this. This can be used by // servers to publish their whereabouts to clients. The output of @@ -828,11 +292,11 @@ public: // currently supported. CORBA_Object_ptr resolve_initial_references (CORBA::String name, - CORBA_Environment &TAO_IN_ENV = CORBA_Environment::default_environment ()); + CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ()); CORBA_Object_ptr resolve_initial_references (CORBA::String name, ACE_Time_Value *timeout, - CORBA_Environment &TAO_IN_ENV = CORBA_Environment::default_environment ()); + CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ()); // This method acts as a mini-bootstrapping Naming Service, which is // provided by the ORB for certain well-known object references. // TAO supports the "NameService", "TradingService", "RootPOA", and @@ -855,13 +319,13 @@ public: STUB_Object *create_stub_object (const TAO_ObjectKey &key, const char *type_id, - CORBA_Environment &TAO_IN_ENV = CORBA_Environment::default_environment ()); + CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ()); // Makes sure that the ORB is open and then creates an IIOP object // based on the endpoint. CORBA_Object_ptr key_to_object (const TAO_ObjectKey &key, const char *type_id, - CORBA_Environment &TAO_IN_ENV = CORBA_Environment::default_environment ()); + CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ()); // Convert key into an object reference. Return Object_ptr as out // parameter. Errors will come through the environment. // @@ -885,7 +349,7 @@ public: // previously-specified port for requests. Returns -1 on failure, // else 0. - static void init_orb_globals (CORBA_Environment &TAO_IN_ENV = CORBA_Environment::default_environment ()); + static void init_orb_globals (CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ()); // Initialize the ORB globals correctly, i.e., only when they // haven't been initialized yet. @@ -1068,8 +532,6 @@ private: #if defined (__ACE_INLINE__) # include "tao/ORB.i" -// We are forced to include this file here to satisfy some dependencies -#include "tao/Managed_Types.i" #endif /* __ACE_INLINE__ */ #if defined (_MSC_VER) |