Home
last modified time | relevance | path

Searched refs:PyRef (Results 1 – 11 of 11) sorted by relevance

/trunk/main/pyuno/source/module/
H A Dpyuno_runtime.cxx122 static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl ) in getRuntimeImpl()
132 globalDict = PyRef( PyModule_GetDict(PyImport_AddModule(const_cast< char * >("__main__")))); in getRuntimeImpl()
142 static PyRef importUnoModule( ) in importUnoModule()
144PyRef globalDict = PyRef( PyModule_GetDict(PyImport_AddModule(const_cast< char * >("__main__")))); in importUnoModule()
146 PyRef module( PyImport_ImportModule( const_cast< char * >("uno") ), SAL_NO_ACQUIRE ); in importUnoModule()
149 PyRef excType, excValue, excTraceback; in importUnoModule()
151 PyRef str( PyObject_Repr( excTraceback.get() ), SAL_NO_ACQUIRE ); in importUnoModule()
155 PyRef valueRep( PyObject_Repr( excValue.get() ), SAL_NO_ACQUIRE ); in importUnoModule()
161 PyRef dict( PyModule_GetDict( module.get() ) ); in importUnoModule()
232 PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx ) in create()
[all …]
H A Dpyuno_impl.hxx91 PyRef,
93 PyRef::Hash,
94 std::equal_to< PyRef >
101 PyRef,
114 typedef ::std::hash_set< PyRef , PyRef::Hash , std::equal_to<PyRef> > ClassSet;
136 PyRef ustring2PyUnicode( const rtl::OUString &source );
140 PyRef AnyToPyObject (const com::sun::star::uno::Any & a, const Runtime &r );
151 PyRef PyUNO_callable_new (
163 PyRef getTypeClass( const Runtime &);
164 PyRef getEnumClass( const Runtime &);
[all …]
H A Dpyuno_except.cxx48 PyRef exc = runtime.any2PyObject( anyExc ); in raisePyExceptionWithAny()
51 PyRef type( getClass( anyExc.getValueType().getTypeName(),runtime ) ); in raisePyExceptionWithAny()
88 static PyRef createClass( const OUString & name, const Runtime &runtime ) in createClass()
115 PyRef base; in createClass()
139 base = PyRef(PyExc_Exception); in createClass()
142 PyRef args( PyTuple_New( 3 ), SAL_NO_ACQUIRE ); in createClass()
144 PyRef pyTypeName = USTR_TO_PYSTR( name /*.replace( '.', '_' )*/ ); in createClass()
146 PyRef bases; in createClass()
150 bases = PyRef( PyTuple_New( 1 ), SAL_NO_ACQUIRE ); in createClass()
156 bases = PyRef( PyTuple_New( 0 ), SAL_NO_ACQUIRE ); in createClass()
[all …]
H A Dpyuno_type.cxx112 static PyRef getClass( const Runtime & r , const char * name) in getClass()
114 return PyRef( PyDict_GetItemString( r.getImpl()->cargo->getUnoModule().get(), (char*) name ) ); in getClass()
117 PyRef getTypeClass( const Runtime & r ) in getTypeClass()
122 PyRef getEnumClass( const Runtime & r ) in getEnumClass()
127 PyRef getCharClass( const Runtime & r ) in getCharClass()
132 PyRef getByteSequenceClass( const Runtime & r ) in getByteSequenceClass()
137 PyRef getAnyClass( const Runtime & r ) in getAnyClass()
145 PyRef value( PyObject_GetAttrString( obj, const_cast< char * >("value") ), SAL_NO_ACQUIRE ); in PyChar2Unicode()
166 PyRef typeName( PyObject_GetAttrString( obj,const_cast< char * >("typeName") ), SAL_NO_ACQUIRE); in PyEnum2Enum()
167 PyRef value( PyObject_GetAttrString( obj, const_cast< char * >("value") ), SAL_NO_ACQUIRE); in PyEnum2Enum()
[all …]
H A Dpyuno_adapter.cxx61 Adapter::Adapter( const PyRef & ref, const Sequence< Type > &types ) in Adapter()
93 PyRef excType, excValue, excTraceback; in raiseInvocationTargetExceptionWhenNeeded()
220 PyRef argsTuple(PyTuple_New( size ), SAL_NO_ACQUIRE ); in invoke()
232 PyRef val = runtime.any2PyObject( aParams[i] ); in invoke()
237 PyRef method(PyObject_GetAttrString( mWrappedObject.get(), (char*)TO_ASCII(aFunctionName)), in invoke()
245 PyRef str( PyObject_Repr( mWrappedObject.get() ), SAL_NO_ACQUIRE ); in invoke()
250 PyRef pyRet( PyObject_CallObject( method.get(), argsTuple.get() ), SAL_NO_ACQUIRE ); in invoke()
374 PyRef obj = runtime.any2PyObject( value ); in setValue()
393 PyRef pyRef( in getValue()
H A Dpyuno_callable.cxx82 PyRef ret; in PyUNO_callable_call()
122 PyRef temp = runtime.any2PyObject (ret_value); in PyUNO_callable_call()
125 PyRef return_list( PyTuple_New (1+aOutParam.getLength()), SAL_NO_ACQUIRE ); in PyUNO_callable_call()
138 PyRef ref = runtime.any2PyObject( aOutParam[i] ); in PyUNO_callable_call()
241 PyRef PyUNO_callable_new ( in PyUNO_callable_new()
257 return PyRef( (PyObject*)self, SAL_NO_ACQUIRE ); in PyUNO_callable_new()
H A Dpyuno.cxx339 PyRef ret; in PyUNO_invoke()
344 PyRef paras,callable; in PyUNO_invoke()
368 paras = PyRef(PyTuple_New( size ), SAL_NO_ACQUIRE); in PyUNO_invoke()
384 callable = PyRef( PyObject_GetAttrString( object , (char*)name ), SAL_NO_ACQUIRE ); in PyUNO_invoke()
388 ret = PyRef( PyObject_CallObject( callable.get(), paras.get() ), SAL_NO_ACQUIRE ); in PyUNO_invoke()
481 PyRef ret = PyUNO_callable_new ( in PyUNO_getattr()
498 PyRef ret = runtime.any2PyObject(anyRet); in PyUNO_getattr()
717 PyRef getPyUnoClass() in getPyUnoClass()
719 return PyRef( reinterpret_cast< PyObject * > ( &PyUNOType ) ); in getPyUnoClass()
H A Dpyuno_module.cxx141 PyRef ret; in getComponentContext()
241 PyRef ret; in createUnoStructHelper()
262 PyRef returnCandidate( (PyObject*)me, SAL_NO_ACQUIRE ); in createUnoStructHelper()
382 PyRef constant = runtime.any2PyObject( a ); in getConstantByName()
465 PyRef ret = getClass( pyString2ustring(obj), runtime ); in getClass()
496 PyRef ret; in generateUuid()
629 PyRef ret; in getCurrentContext()
645 PyRef ret; in setCurrentContext()
H A Dpyuno_util.cxx61 PyRef ustring2PyUnicode( const OUString & str ) in ustring2PyUnicode()
63 PyRef ret; in ustring2PyUnicode()
66 ret = PyRef( PyUnicode_DecodeUTF8( sUtf8.getStr(), sUtf8.getLength(), NULL) , SAL_NO_ACQUIRE ); in ustring2PyUnicode()
87 PyRef getObjectFromUnoModule( const Runtime &runtime, const char * func ) in getObjectFromUnoModule()
89PyRef object(PyDict_GetItemString( runtime.getImpl()->cargo->getUnoModule().get(), (char*)func ) ); in getObjectFromUnoModule()
/trunk/main/pyuno/inc/pyuno/
H A Dpyuno.hxx100 class PyRef class
104 PyRef () : m(0) {} in PyRef() function in pyuno::PyRef
105 PyRef( PyObject * p ) : m( p ) { Py_XINCREF( m ); } in PyRef() function in pyuno::PyRef
107 PyRef( PyObject * p, __sal_NoAcquire ) : m( p ) {} in PyRef() function in pyuno::PyRef
109 PyRef( const PyRef &r ) : m( r.get() ) { Py_XINCREF( m ); } in PyRef() function in pyuno::PyRef
111 ~PyRef() { Py_XDECREF( m ); } in ~PyRef()
121 PyRef & operator = ( const PyRef & r ) in operator =()
129 bool operator == ( const PyRef & r ) const in operator ==()
159 sal_IntPtr operator () ( const PyRef &r) const { return sal_IntPtr( r.get() ); } in operator ()()
234 PyRef any2PyObject (const com::sun::star::uno::Any &source ) const;
[all …]
/trunk/main/pyuno/source/loader/
H A Dpyuno_loader.cxx41 using pyuno::PyRef;
59 PyRef excType, excValue, excTraceback; in raiseRuntimeExceptionWhenNeeded()
71 static PyRef getLoaderModule() in getLoaderModule()
73 PyRef module( in getLoaderModule()
83 return PyRef( PyModule_GetDict( module.get() )); in getLoaderModule()
86 static PyRef getObjectFromLoaderModule( const char * func ) in getObjectFromLoaderModule()
88 PyRef object( PyDict_GetItemString(getLoaderModule().get(), (char*)func ) ); in getObjectFromLoaderModule()
195 PyRef pyCtx = runtime.any2PyObject( in CreateInstance()
198 PyRef clazz = getObjectFromLoaderModule( "Loader" ); in CreateInstance()
199 PyRef args ( PyTuple_New( 1 ), SAL_NO_ACQUIRE ); in CreateInstance()
[all …]