diff options
author | Peter Foley <pefoley2@verizon.net> | 2012-08-27 15:28:23 -0400 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-10-07 10:42:14 +0200 |
commit | 4b56d82c7d20ba5897d87aaf7fc94da5356b8eec (patch) | |
tree | cf07b915fb3a6c76b992b28cdeeddeb346bad888 /cli_ure/source/uno_bridge/cli_environment.h | |
parent | b5bc77572338d04f8ff165ca85111096ce1d4804 (diff) |
convert uno_bridge to new syntax
Change-Id: Iac5e9a860f7ef68104c4cfc19abe686b754190af
Diffstat (limited to 'cli_ure/source/uno_bridge/cli_environment.h')
-rw-r--r-- | cli_ure/source/uno_bridge/cli_environment.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/cli_ure/source/uno_bridge/cli_environment.h b/cli_ure/source/uno_bridge/cli_environment.h index 683ad84a6081..d04a92bcf194 100644 --- a/cli_ure/source/uno_bridge/cli_environment.h +++ b/cli_ure/source/uno_bridge/cli_environment.h @@ -21,7 +21,6 @@ #define INCLUDED_CLI_ENVIRONMENT_H #include "cli_base.h" -#using <mscorlib.dll> using namespace System; using namespace System::Collections; @@ -30,12 +29,12 @@ using namespace System::Runtime::Serialization; namespace cli_uno { -public __gc class Cli_environment +public ref class Cli_environment { - static System::String* sOidPart; - static Hashtable* m_objects; - static System::Runtime::Serialization::ObjectIDGenerator* m_IDGen; - inline static System::String* createKey(System::String* oid, System::Type* t); + static System::String^ sOidPart; + static Hashtable^ m_objects; + static System::Runtime::Serialization::ObjectIDGenerator^ m_IDGen; + inline static System::String^ createKey(System::String^ oid, System::Type^ t); #if OSL_DEBUG_LEVEL >= 1 int _numRegisteredObjects; @@ -45,11 +44,11 @@ public: static Cli_environment() { - m_objects = Hashtable::Synchronized(new Hashtable()); - m_IDGen = new System::Runtime::Serialization::ObjectIDGenerator(); - System::Text::StringBuilder* buffer = new System::Text::StringBuilder(256); + m_objects = Hashtable::Synchronized(gcnew Hashtable()); + m_IDGen = gcnew System::Runtime::Serialization::ObjectIDGenerator(); + System::Text::StringBuilder^ buffer = gcnew System::Text::StringBuilder(256); Guid gd = Guid::NewGuid(); - buffer->Append(S";cli[0];"); + buffer->Append(";cli[0];"); buffer->Append(gd.ToString()); sOidPart = buffer->ToString(); } @@ -63,21 +62,21 @@ public: cli object is represents all interfaces of the UNO object. Therefore the object can be registered only with its OID; a type is not necessary. */ - Object* registerInterface(Object* obj, System::String* oid); + Object^ registerInterface(Object^ obj, System::String^ oid); /** Registers a CLI object as being mapped by this bridge. The resulting object represents exactly one UNO interface. */ - Object* registerInterface(Object* obj, System::String* oid, System::Type* type); + Object^ registerInterface(Object^ obj, System::String^ oid, System::Type^ type); /** By revoking an interface it is declared that the respective interface has not been mapped. The proxy implementations call revoke interface in their destructors. */ - inline void revokeInterface(System::String* oid); + inline void revokeInterface(System::String^ oid); - void revokeInterface(System::String* oid, System::Type* type); + void revokeInterface(System::String^ oid, System::Type^ type); /** * Retrieves an interface identified by its object id and type from this * environment. @@ -86,7 +85,7 @@ public: * @param type the type description of the interface to be retrieved * @see com.sun.star.uno.IEnvironment#getRegisteredInterface */ - Object* getRegisteredInterface(System::String* oid, System::Type* type); + Object^ getRegisteredInterface(System::String^ oid, System::Type^ type); /** * Generates a worldwide unique object identifier (oid) for the given object. It is @@ -96,7 +95,7 @@ public: * @return the generated oid. * @param object the object for which a Oid should be generated. */ - static System::String* getObjectIdentifier(Object* obj); + static System::String^ getObjectIdentifier(Object^ obj); }; |