LibreOffice Module cli_ure (master) 1
|
#include <cli_proxy.h>
Public Member Functions | |
UnoInterfaceInfo | findInfo (::System::Type ^ type) |
virtual srrm::IMessage | Invoke (srrm::IMessage^ msg) override |
RealProxy::Invoke. More... | |
void | addUnoInterface (uno_Interface *pUnoI, typelib_InterfaceTypeDescription *pTd) |
Must be called from within a synchronized section. More... | |
~UnoInterfaceProxy () | |
!UnoInterfaceProxy () | |
System::String | getOid () |
virtual bool | CanCastTo (System::Type^ fromType, System::Object^ o) |
void | set (System::String^ name) |
Static Public Member Functions | |
static System::Object | create (Bridge *bridge, uno_Interface *pUnoI, typelib_InterfaceTypeDescription *pTd, const OUString &oid) |
Creates a proxy and registers it on the dot NET side. More... | |
Public Attributes | |
System::String | m_sTypeName |
used for IRemotingTypeInfo.TypeName More... | |
sc::ArrayList | m_listIfaces |
The list is filled with UnoInterfaceInfo objects. More... | |
int | m_numUnoIfaces |
The number of UNO interfaces this proxy represents. More... | |
sc::ArrayList | m_listAdditionalProxies |
The list is filled with additional UnoInterfaceProxy object due to aggregation via bridges. More... | |
int | m_nlistAdditionalProxies |
Bridge const * | m_bridge |
System::String | m_oid |
rtl_uString * | _sInterfaces |
The string contains all names of UNO interfaces which are represented by this proxy. More... | |
int | _numInterfaces |
virtual property System::String | TypeName |
Protected Member Functions | |
srrm::IMessage | invokeObject (sc::IDictionary^ properties, srrm::LogicalCallContext^ context, srrm::IMethodCallMessage^ mcm) |
Private Member Functions | |
UnoInterfaceProxy (Bridge *bridge, uno_Interface *pUnoI, typelib_InterfaceTypeDescription *pTD, const OUString &oid) | |
Static Private Member Functions | |
static srrm::IMessage | constructReturnMessage (System::Object^ retVal, array< System::Object^>^ outArgs, typelib_InterfaceMethodTypeDescription *mtd, srrm::IMessage^ msg, System::Object^ exc) |
If the argument args is NULL then this function is called for an attribute method (either setXXX or getXXX). More... | |
Static Private Attributes | |
static System::String | m_methodNameString |
static System::String | m_typeNameString = gcnew System::String("__TypeName") |
static System::String | m_ArgsString = gcnew System::String("__Args") |
static System::String | m_CallContextString |
static System::String | m_system_Object_String |
static System::String | m_methodSignatureString |
static System::String | m_Equals_String = gcnew System::String("Equals") |
static System::String | m_GetHashCode_String |
static System::String | m_GetType_String = gcnew System::String("GetType") |
static System::String | m_ToString_String = gcnew System::String("ToString") |
Definition at line 56 of file cli_proxy.h.
cli_uno::UnoInterfaceProxy::~UnoInterfaceProxy | ( | ) |
Definition at line 129 of file cli_proxy.cxx.
References UnoInterfaceProxy().
cli_uno::UnoInterfaceProxy::!UnoInterfaceProxy | ( | ) |
Definition at line 134 of file cli_proxy.cxx.
References cli_uno::CliEnvHolder::g_cli_env, m_bridge, m_oid, cli_uno::mapUnoString(), cli_uno::Bridge::release(), and cli_uno::Cli_environment::revokeInterface().
|
private |
Definition at line 104 of file cli_proxy.cxx.
References _numInterfaces, _sInterfaces, cli_uno::Bridge::acquire(), addUnoInterface(), m_bridge, m_bridge, m_listAdditionalProxies, m_listIfaces, m_nlistAdditionalProxies, m_numUnoIfaces, m_oid, NULL, and pData.
Referenced by create(), and ~UnoInterfaceProxy().
void cli_uno::UnoInterfaceProxy::addUnoInterface | ( | uno_Interface * | pUnoI, |
typelib_InterfaceTypeDescription * | pTd | ||
) |
Must be called from within a synchronized section.
Add only the interface if it is not already contained. This method is called from the constructor and as a result of IRemotingTypeInfo::CanCastTo
Definition at line 164 of file cli_proxy.cxx.
References _numInterfaces, _sInterfaces, m_bridge, m_listIfaces, m_numUnoIfaces, m_oid, m_type, cli_uno::UnoInterfaceInfo::m_typeDesc, cli_uno::Bridge::m_uno_env, cli_uno::mapCliString(), and typelib_typedescription_equals().
Referenced by UnoInterfaceProxy().
|
virtual |
Definition at line 210 of file cli_proxy.cxx.
References args, cli_uno::Bridge::call_uno(), findInfo(), m_bridge, m_listAdditionalProxies, m_listIfaces, cli_uno::BridgeRuntimeError::m_message, m_nlistAdditionalProxies, cli_uno::UnoInterfaceInfo::m_typeDesc, cli_uno::UnoInterfaceInfo::m_unoI, cli_uno::mapCliString(), and OUStringToOString().
|
staticprivate |
If the argument args is NULL then this function is called for an attribute method (either setXXX or getXXX).
For attributes the argument mtd is also NULL.
Definition at line 586 of file cli_proxy.cxx.
References args, i, m_CallContextString, and props.
Referenced by Invoke().
|
static |
Creates a proxy and registers it on the dot NET side.
Definition at line 150 of file cli_proxy.cxx.
References cli_uno::CliEnvHolder::g_cli_env, cli_uno::mapUnoString(), cli_uno::Cli_environment::registerInterface(), and UnoInterfaceProxy().
Referenced by cli_uno::Bridge::map_uno2cli().
UnoInterfaceInfo cli_uno::UnoInterfaceProxy::findInfo | ( | ::System::Type ^ | type | ) |
Definition at line 377 of file cli_proxy.cxx.
References findInfo(), i, m_listAdditionalProxies, m_listIfaces, m_nlistAdditionalProxies, m_numUnoIfaces, cli_uno::UnoInterfaceInfo::m_type, and type.
Referenced by CanCastTo(), findInfo(), and Invoke().
|
inline |
Definition at line 117 of file cli_proxy.h.
References m_oid.
Referenced by cli_uno::Cli_environment::getObjectIdentifier(), and invokeObject().
|
overridevirtual |
RealProxy::Invoke.
Definition at line 398 of file cli_proxy.cxx.
References args, cli_uno::Bridge::call_uno(), constructReturnMessage(), err, findInfo(), cppu::UnoType< typename T >::get(), cli_uno::TypeDescr::get(), invokeObject(), cli_uno::loadCliType(), m_ArgsString, m_bridge, m_CallContextString, m_methodNameString, m_methodSignatureString, m_system_Object_String, cli_uno::UnoInterfaceInfo::m_typeDesc, m_typeNameString, cli_uno::UnoInterfaceInfo::m_unoI, cli_uno::mapCliString(), cli_uno::mapUnoString(), nPos, NULL, props, sal_False, and sal_True.
|
protected |
Definition at line 313 of file cli_proxy.cxx.
References args, getOid(), m_ArgsString, m_Equals_String, m_GetHashCode_String, m_GetType_String, m_methodNameString, m_oid, m_ToString_String, and props.
Referenced by Invoke().
|
inline |
Definition at line 129 of file cli_proxy.h.
References m_sTypeName, and name.
int cli_uno::UnoInterfaceProxy::_numInterfaces |
Definition at line 92 of file cli_proxy.h.
Referenced by addUnoInterface(), and UnoInterfaceProxy().
rtl_uString* cli_uno::UnoInterfaceProxy::_sInterfaces |
The string contains all names of UNO interfaces which are represented by this proxy.
It is used to print out the interfaces when this proxy dies. In the destructor it is not allowed to access m_listIfaces or any other managed object.
Definition at line 89 of file cli_proxy.h.
Referenced by addUnoInterface(), and UnoInterfaceProxy().
|
staticprivate |
Definition at line 151 of file cli_proxy.h.
Referenced by Invoke(), and invokeObject().
Bridge const* cli_uno::UnoInterfaceProxy::m_bridge |
Definition at line 80 of file cli_proxy.h.
Referenced by addUnoInterface(), CanCastTo(), Invoke(), and UnoInterfaceProxy().
|
staticprivate |
Definition at line 152 of file cli_proxy.h.
Referenced by constructReturnMessage(), and Invoke().
|
staticprivate |
Definition at line 158 of file cli_proxy.h.
Referenced by invokeObject().
|
staticprivate |
Definition at line 159 of file cli_proxy.h.
Referenced by invokeObject().
|
staticprivate |
Definition at line 161 of file cli_proxy.h.
Referenced by invokeObject().
sc::ArrayList cli_uno::UnoInterfaceProxy::m_listAdditionalProxies |
The list is filled with additional UnoInterfaceProxy object due to aggregation via bridges.
Though the latter is strongly discouraged, this has to be supported.
Definition at line 75 of file cli_proxy.h.
Referenced by CanCastTo(), findInfo(), and UnoInterfaceProxy().
sc::ArrayList cli_uno::UnoInterfaceProxy::m_listIfaces |
The list is filled with UnoInterfaceInfo objects.
The list can only grow and elements are never changed. If an element was added it must not be changed!
Definition at line 66 of file cli_proxy.h.
Referenced by addUnoInterface(), CanCastTo(), findInfo(), and UnoInterfaceProxy().
|
staticprivate |
Definition at line 148 of file cli_proxy.h.
Referenced by Invoke(), and invokeObject().
|
staticprivate |
Definition at line 156 of file cli_proxy.h.
Referenced by Invoke().
int cli_uno::UnoInterfaceProxy::m_nlistAdditionalProxies |
Definition at line 76 of file cli_proxy.h.
Referenced by CanCastTo(), findInfo(), and UnoInterfaceProxy().
int cli_uno::UnoInterfaceProxy::m_numUnoIfaces |
The number of UNO interfaces this proxy represents.
It corresponds to the number of elements in m_listIfaces.
Definition at line 70 of file cli_proxy.h.
Referenced by addUnoInterface(), findInfo(), and UnoInterfaceProxy().
System::String cli_uno::UnoInterfaceProxy::m_oid |
Definition at line 81 of file cli_proxy.h.
Referenced by addUnoInterface(), getOid(), and invokeObject().
System::String cli_uno::UnoInterfaceProxy::m_sTypeName |
|
staticprivate |
Definition at line 154 of file cli_proxy.h.
Referenced by Invoke().
|
staticprivate |
Definition at line 162 of file cli_proxy.h.
Referenced by invokeObject().
|
staticprivate |
Definition at line 150 of file cli_proxy.h.
Referenced by Invoke().
virtual property System::String cli_uno::UnoInterfaceProxy::TypeName |
Definition at line 123 of file cli_proxy.h.