LibreOffice Module cli_ure (master) 1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
cli_uno::Cli_environment Class Reference

#include <cli_environment.h>

Public Member Functions

 Cli_environment ()
 
 ~Cli_environment ()
 
 !Cli_environment ()
 
Object registerInterface (Object ^ obj, System::String ^ oid)
 Registers a UNO object as being mapped by this bridge. More...
 
Object registerInterface (Object ^ obj, System::String ^ oid, System::Type ^ type)
 Registers a CLI object as being mapped by this bridge. More...
 
void revokeInterface (System::String ^ oid)
 By revoking an interface it is declared that the respective interface has not been mapped. More...
 
void revokeInterface (System::String ^ oid, System::Type ^ type)
 
Object getRegisteredInterface (System::String ^ oid, System::Type ^ type)
 Retrieves an interface identified by its object id and type from this environment. More...
 

Static Public Member Functions

static System::String createKey (System::String ^ oid, System::Type ^ t)
 
static Cli_environment ()
 
static System::String getObjectIdentifier (Object ^ obj)
 Generates a worldwide unique object identifier (oid) for the given object. More...
 

Public Attributes

int _numRegisteredObjects
 

Static Public Attributes

static System::String sOidPart
 
static Hashtable m_objects
 
static System::Runtime::Serialization::ObjectIDGenerator m_IDGen
 

Detailed Description

Definition at line 32 of file cli_environment.h.

Constructor & Destructor Documentation

◆ Cli_environment() [1/2]

cli_uno::Cli_environment::Cli_environment ( )
inlinestatic

Definition at line 43 of file cli_environment.h.

References m_IDGen, m_objects, and sOidPart.

Referenced by ~Cli_environment().

◆ Cli_environment() [2/2]

cli_uno::Cli_environment::Cli_environment ( )
inline

◆ ~Cli_environment()

cli_uno::Cli_environment::~Cli_environment ( )

Definition at line 50 of file cli_environment.cxx.

References Cli_environment().

◆ !Cli_environment()

cli_uno::Cli_environment::!Cli_environment ( )

Definition at line 55 of file cli_environment.cxx.

Member Function Documentation

◆ createKey()

System::String cli_uno::Cli_environment::createKey ( System::String ^  oid,
System::Type ^  t 
)
inlinestatic

Definition at line 37 of file cli_environment.cxx.

References t.

Referenced by getRegisteredInterface().

◆ getObjectIdentifier()

System::String cli_uno::Cli_environment::getObjectIdentifier ( Object ^  obj)
static

Generates a worldwide unique object identifier (oid) for the given object.

It is guaranteed, that subsequent calls to the method with the same object will give the same id.

Returns
the generated oid.
Parameters
objectthe object for which an Oid should be generated.

Definition at line 138 of file cli_environment.cxx.

References cli_uno::UnoInterfaceProxy::getOid(), m_IDGen, and sOidPart.

Referenced by cli_uno::Bridge::map_cli2uno().

◆ getRegisteredInterface()

System::Object cli_uno::Cli_environment::getRegisteredInterface ( System::String ^  oid,
System::Type ^  type 
)

Retrieves an interface identified by its object id and type from this environment.

Parameters
oidobject id of interface to be retrieved
typethe type description of the interface to be retrieved
See also
com.sun.star.uno.IEnvironment::getRegisteredInterface

Definition at line 116 of file cli_environment.cxx.

References createKey(), m_objects, and type.

Referenced by cli_uno::Bridge::map_uno2cli().

◆ registerInterface() [1/2]

Object cli_uno::Cli_environment::registerInterface ( Object ^  obj,
System::String ^  oid 
)

Registers a UNO object as being mapped by this bridge.

The resulting 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.

References Object.

Referenced by cli_uno::UnoInterfaceProxy::create(), and cli_uno::CliProxy::create().

◆ registerInterface() [2/2]

Object cli_uno::Cli_environment::registerInterface ( Object ^  obj,
System::String ^  oid,
System::Type ^  type 
)

Registers a CLI object as being mapped by this bridge.

The resulting object represents exactly one UNO interface.

References Object.

◆ revokeInterface() [1/2]

void cli_uno::Cli_environment::revokeInterface ( System::String ^  oid)
inline

By revoking an interface it is declared that the respective interface has not been mapped.

The proxy implementations call revoke interface in their destructors.

Referenced by cli_uno::UnoInterfaceProxy::!UnoInterfaceProxy(), and cli_uno::CliProxy::~CliProxy().

◆ revokeInterface() [2/2]

void cli_uno::Cli_environment::revokeInterface ( System::String ^  oid,
System::Type ^  type 
)

References Object.

Member Data Documentation

◆ _numRegisteredObjects

int cli_uno::Cli_environment::_numRegisteredObjects

Definition at line 40 of file cli_environment.h.

◆ m_IDGen

System::Runtime::Serialization::ObjectIDGenerator cli_uno::Cli_environment::m_IDGen
static

Definition at line 36 of file cli_environment.h.

Referenced by Cli_environment(), and getObjectIdentifier().

◆ m_objects

Hashtable cli_uno::Cli_environment::m_objects
static

Definition at line 35 of file cli_environment.h.

Referenced by Cli_environment(), and getRegisteredInterface().

◆ sOidPart

System::String cli_uno::Cli_environment::sOidPart
static

Definition at line 34 of file cli_environment.h.

Referenced by Cli_environment(), and getObjectIdentifier().


The documentation for this class was generated from the following files: