| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
|
|
| |
private.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
| |
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
|
|
|
| |
We need this to call PySide::signalUpdateSource to setup the signals on objects
originated from C++.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
|
| |
This method is needed because you can not call Converter<T>::isConvertible inside
a Converter<Y>::isConvertible implementation, otherwise it'll create a 2-step
implicit conversion.
|
|
|
|
| |
Tests were also added.
|
|
|
|
|
|
| |
This fix is specific for the cases when the "protected hack" is
turned off.
Also added some tests.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Export enums without macro
* Declare virtual destructor on all classes with virtual functions
* Fix extern "C" declaration scope
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
| |
|
|
|
|
| |
Also uses FileOut class to write the file, so the file is only written if needed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The new semantic is:
Returns true when the type can be converted to T OR the type is T.
The old semantic was:
Returns true when the type can be converted to T and false if the
type is T, however int and float converters did not follow this
rule, because they used PyNumber_Check on their isConvertible implementation.
|
|
|
|
| |
Removed "new_ctor_operator" test from black list.
|
|
|
|
|
|
|
|
|
|
|
|
| |
To improve legibility and understanding ConverterBase<T> was renamed
to ValueTypeConverter<T>, and ConverterBase<T*> specialization is
now an independent base converter ObjectTypeConverter<T>.
Converter_CppEnum was renamed to EnumConverter.
The HeaderGenerator and custom converters for the test bindings were
updated accordingly.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
|
| |
|
|
|
|
|
|
| |
Previously all implicit conversions were constructors, now they could be
conversion operators, with no explicit arguments except for the owner
class where they where defined.
|
|
|
|
| |
field in SbkBaseWrapper_Type.
|
|
|
|
|
|
|
| |
The macros for casting a wrapper C++ void pointer to a specific
C++ pointer are no longer generated, converters are used instead.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
| |
|
| |
|
|
|
|
| |
symbols.
|
|
|
|
|
|
| |
To access Sbk*Type variables from other modules, you need to use the array provided via CObjects.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
|
|
|
|
| |
Argument removal and type modification no longer affects the generation
of virtual method signatures in the binding code.
|
|
|
|
| |
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
| |
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org> and Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
| |
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
|
|
|
| |
Reviewed by Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
| |
|
| |
|
|
|
|
| |
Reviewed by Hugo Parent <hugo.lima@openbossa.org>
|
|
|
|
| |
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
|
| |
Example: "other" module depends on "sample" module, so the generated
module header for "other" (i.e. "other_python.h") will include
"sample_python.h".
Of course the required module include path must be set by the build
system.
|
|
|
|
|
|
| |
dynamic one.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template struct
In addition to the mere use of SbkCopyCppObject to copy C++ objects,
it is needed to know if a C++ type has a C++ wrapped produced by the
generator. To solve this SbkCopyCppObject was transformed in the template
struct CppObjectCopier with the methods copy and the constant member
isCppWrapper.
The Converter[Base]<>::createWrapper methods were replaced by template
function SbkCreateWrapper.
Also some refactoring was made on the Converters code to improve legibility.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
|
|
|
| |
the flag enable-pyside-extensions is on.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SbkBaseWrapperType.
The wrapped classes are described with a SbkBaseWrapperType structure which
extends the PyTypeObject with information about multiple inheritance and
parenting ownership. This works well for the classes produced by the generator
but inheriting classes written in Python continues using the PyTypeObject to
describe themselves. To fix this the SbkBaseWrapperType is now a metatype for
all the wrapped classes and anyone inheriting from them.
In addition all the wrapped classes now inherit from SbkBaseWrapper, since
Python's PyType_Ready method need that multiple inheriting classes have a
common base class with the same size of the classes involved in the multiple
inheritance, which disqualifies Python's base "object" class.
The metatype and the base wrapper type are initialized by calling the new
Shiboken::init_shiboken() function. This is done by all the imported binding
modules, but it is really run only in the first call.
Another noteworthy change is the replacement of PyTypeObject as a basis for
SbkBaseWrapperType by the PyHeapTypeObject, since the latter is the proper
choice for types created on the heap, e.g. user defined classes extending
the generated wrapper classes.
Reviewed by Hugo Lima <hugo.lima@openbossa.org>
|
|
|
|
| |
with SbkBaseWrapper.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added the template function
T* SbkCopyCppObject(const T& cppobj);
whose task is simply to copy a C++ object. If the binding has a C++ class
wrapper for it, the function is specialized to use the copy constructor
of the C++ wrapper class. This replaces the Converter<T>::copyCppObject
method.
Also moved implementation of Converter<T>::toPython from the generator to
ConverterBase<T> in the conversions header, for it makes use of the
SbkCopyCppObject.
Reviewed by Lauro Neto <lauro.neto@openbossa.org>
|
|
|
|
| |
Reviewed by Hugo Lima <hugo.lima@openbossa.org>
|
|
|
|
| |
declaration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To avoid confusion of Python stuff with Shiboken generated stuff.
For example: a C++ class called "String" would have the PyString_Type
wrapper generated for it, mixing with the proper Python PyString_Type;
now the generate code will have things like SbkString_Type, SbkString_New,
SbkString_someMethod, and so on.
PyBaseWrapper and its variants were renamed to SbkBaseWrapper.
PyType<T>() is now SbkType<T>()
PyEnumObject was renamed to SbkEnumObject.
|
|
|
|
|
|
|
| |
auto generated by the compiler using the function PyType<T> to get
PyTypeObject of a type T.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|