LibreOffice Module cli_ure (master) 1
Public Member Functions | Public Attributes | List of all members
cli_uno::Bridge Struct Reference

An instance of Bridge represents exactly one mapping therefore either m_cli2uno or m_uno2cli is valid. More...

#include <cli_bridge.h>

Collaboration diagram for cli_uno::Bridge:
[legend]

Public Member Functions

 ~Bridge ()
 
 Bridge (uno_Environment *java_env, uno_ExtEnvironment *uno_env, bool registered_java2uno)
 
void acquire () const
 ToDo I doubt that the case that the ref count raises from 0 to 1 can occur. More...
 
void release () const
 
void map_to_uno (void *uno_data, System::Object^ cli_data, typelib_TypeDescriptionReference *type, bool assign) const
 
void map_to_cli (System::Object^ *cli_data, void const *uno_data, typelib_TypeDescriptionReference *type, System::Type^ info, bool bDontCreateObj) const
 
System::Object map_uno2cli (uno_Interface *pUnoI, typelib_InterfaceTypeDescription *pTD) const
 
System::Object call_uno (uno_Interface *pUnoI, typelib_TypeDescription *member_td, typelib_TypeDescriptionReference *return_type, sal_Int32 nParams, typelib_MethodParameter const *pParams, array< System::Object^>^ args, array< System::Type^>^ argTypes, System::Object^ *pException) const
 
void call_cli (System::Object^ cliI, sr::MethodInfo^ method, typelib_TypeDescriptionReference *return_type, typelib_MethodParameter *params, int nParams, void *uno_ret, void *uno_args[], uno_Any **uno_exc) const
 
uno_Interface * map_cli2uno (System::Object^ cliI, typelib_TypeDescription *pTD) const
 

Public Attributes

oslInterlockedCount m_ref
 
uno_ExtEnvironment * m_uno_env
 
uno_Environmentm_uno_cli_env
 
Mapping m_cli2uno
 
Mapping m_uno2cli
 
bool m_registered_cli2uno
 

Detailed Description

An instance of Bridge represents exactly one mapping therefore either m_cli2uno or m_uno2cli is valid.

Definition at line 57 of file cli_bridge.h.

Constructor & Destructor Documentation

◆ ~Bridge()

cli_uno::Bridge::~Bridge ( )

Definition at line 225 of file cli_bridge.cxx.

References m_uno_cli_env, and m_uno_env.

◆ Bridge()

cli_uno::Bridge::Bridge ( uno_Environment java_env,
uno_ExtEnvironment *  uno_env,
bool  registered_java2uno 
)

Member Function Documentation

◆ acquire()

void cli_uno::Bridge::acquire ( ) const

ToDo I doubt that the case that the ref count raises from 0 to 1 can occur.

uno_ext_getMapping returns an acquired mapping. Every time that function is called then a new mapping is created. Following the rules of ref counted objects, then if the ref count is null no one has a reference to the object anymore. Hence no one can call acquire. If someone calls acquire then they must have kept an unacquired pointer which is illegal.

Definition at line 169 of file cli_bridge.cxx.

References cli_uno::Bridge_free(), m_cli2uno, m_ref, m_registered_cli2uno, m_uno2cli, m_uno_cli_env, m_uno_env, and uno_registerMapping().

Referenced by cli_uno::CliProxy::CliProxy(), cli_uno::Mapping_acquire(), cli_uno::UnoInterfaceInfo::UnoInterfaceInfo(), and cli_uno::UnoInterfaceProxy::UnoInterfaceProxy().

◆ call_cli()

void cli_uno::Bridge::call_cli ( System::Object^  cliI,
sr::MethodInfo^  method,
typelib_TypeDescriptionReference *  return_type,
typelib_MethodParameter *  params,
int  nParams,
void *  uno_ret,
void *  uno_args[],
uno_Any **  uno_exc 
) const

◆ call_uno()

System::Object cli_uno::Bridge::call_uno ( uno_Interface *  pUnoI,
typelib_TypeDescription member_td,
typelib_TypeDescriptionReference *  return_type,
sal_Int32  nParams,
typelib_MethodParameter const *  pParams,
array< System::Object^>^  args,
array< System::Type^>^  argTypes,
System::Object^ *  pException 
) const

◆ map_cli2uno()

uno_Interface * cli_uno::Bridge::map_cli2uno ( System::Object^  cliI,
typelib_TypeDescription pTD 
) const

◆ map_to_cli()

void cli_uno::Bridge::map_to_cli ( System::Object^ *  cli_data,
void const *  uno_data,
typelib_TypeDescriptionReference *  type,
System::Type^  info,
bool  bDontCreateObj 
) const
Parameters
infothe type of the converted data. It may be a byref type.
infoThe expected target type. Currently info is provided when this method is called to convert the in/out and out parameters of a call from cli to uno. Then info is always a byref type, e.g. "System.String&". info is used for Any and Enum conversion.
bDontCreateObjfalse - a new object is created which holds the mapped uno value and is assigned to cli_data. true - cli_data already contains the newly constructed object. This is the case if a struct is converted then on the first call to map_to_cli the new object is created. If the struct inherits another struct then this function is called recursively while the newly created object is passed in cli_data.

Definition at line 1448 of file cli_data.cxx.

References args, aStr, cli_uno::TypeDescr::get(), i, cli_uno::loadCliType(), map_to_cli(), map_uno2cli(), cli_uno::mapUnoString(), cli_uno::mapUnoType(), nElements, nPos, NULL, p, sal_True, sMessage, and type.

Referenced by call_cli(), call_uno(), and map_to_cli().

◆ map_to_uno()

void cli_uno::Bridge::map_to_uno ( void *  uno_data,
System::Object^  cli_data,
typelib_TypeDescriptionReference *  type,
bool  assign 
) const

◆ map_uno2cli()

System::Object cli_uno::Bridge::map_uno2cli ( uno_Interface *  pUnoI,
typelib_InterfaceTypeDescription *  pTD 
) const

◆ release()

void cli_uno::Bridge::release ( ) const

Member Data Documentation

◆ m_cli2uno

Mapping cli_uno::Bridge::m_cli2uno

Definition at line 63 of file cli_bridge.h.

Referenced by acquire(), Bridge(), release(), and cli_uno::uno_ext_getMapping().

◆ m_ref

oslInterlockedCount cli_uno::Bridge::m_ref
mutable

Definition at line 59 of file cli_bridge.h.

Referenced by acquire(), and release().

◆ m_registered_cli2uno

bool cli_uno::Bridge::m_registered_cli2uno

Definition at line 65 of file cli_bridge.h.

Referenced by acquire(), and release().

◆ m_uno2cli

Mapping cli_uno::Bridge::m_uno2cli

Definition at line 64 of file cli_bridge.h.

Referenced by acquire(), Bridge(), release(), and cli_uno::uno_ext_getMapping().

◆ m_uno_cli_env

uno_Environment* cli_uno::Bridge::m_uno_cli_env

Definition at line 61 of file cli_bridge.h.

Referenced by acquire(), Bridge(), and ~Bridge().

◆ m_uno_env

uno_ExtEnvironment* cli_uno::Bridge::m_uno_env

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