| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
It accepts an AbstractMetaFunction and returns the full name in
Python, including the module namespace.
E.g.: "sample.SimpleFile.exists"
|
|
|
|
|
|
|
| |
The default values for arguments are simple strings, sometimes during
binding code generation scope information is needed. The method
ShibokenGenerator::guessScopeForDefaultValue tries to guess scope
information for default values.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
It doesn't use instance information and can now be called by other
static methods.
Reviewed by Renato Araújo <renato.filho@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
| |
Tests were also added.
|
| |
|
|
|
|
|
|
|
|
|
| |
- Don't use stream operator on macros.
- Avoid use of INDENT << INDENT.
- Rename some variables on generated code to follow our coding style.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
| |
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
|
| |
|
|
|
|
|
| |
The method now checks native code injections instead of only target
language code.
|
|
|
|
|
|
|
| |
This method tries to build an AbstractMetaType from a string, it is
used by guessCPythonCheckFunction to better handle type replacements
identifying types already known by the type database for the currently
generated, instead of treating said replacements as mere blobs.
|
|
|
|
|
|
|
|
| |
ShibokenGenerator got the methods:
* QString extendedIsConvertibleFunctionName(TypeEntry*)
Returns the name of an extended "isConvertible" function.
* QString extendedToCppFunctionName(TypeEntry*)
Returns the name of an extended "toCpp" function.
|
|
|
|
|
|
| |
It returns all types from a previous module that could be generated
by a conversion operator defined in the current module, as well as
all the possible arguments for the conversion.
|
|
|
|
| |
The new method returns a flat list of all the given class' ancestors.
|
|
|
|
|
|
| |
AbstractMetaType.
This is needed by hash function writer.
|
| |
|
|
|
|
|
|
|
| |
It checks if an AbstractMetaType represents a C++ pair container.
Also updated code to make use of the new method.
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
|
|
|
|
|
| |
It checks if an AbstractMetaType represents a C string.
Also updated code to make use of the new method.
|
|
|
|
|
|
|
| |
This will increase the binding size, so there's an option to disable
verbose error messages. "--disable-verbose-error-messages"
Reviewed by Renato Araújo <renato.filho@openbossa.org> and Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
The new expressively named methods hasMethodsWithReferenceCountModifications
and needsReferenceCountControl returns boolean values to help generation
of code for reference counting support.
|
|
|
|
|
|
|
| |
Added the following self evident methods to ShibokenGenerator:
* QString cpythonGettersSettersDefinitionName(const AbstractMetaClass*);
* QString cpythonGetterFunctionName(const AbstractMetaField*);
* QString cpythonSetterFunctionName(const AbstractMetaField*);
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
If the method returns a pointer and there are no policies for the return type, the returned value is
considered child of the current object (self).
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
| |
Reviewed by Hugo Parent <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are the methods added to ShibokenGenerator:
* classNeedsGetattroFunction(metaClass)
Returns true if a tp_getattro function should be generated for the
given class. At the moment the only criteria is that the class
has an overload with both static and non-static versions of a method.
* getMethodsWithBothStaticAndNonStaticMethods(metaClass)
Returns a list of methods of the given class where each one is part
of a different overload with both static and non-static method.
* cpythonMethodDefinitionName(metaFunc)
Returns the name of a method definition (a single method, i.e.
a PyMethodDef struct) for a given method.
* cpythonGetattroFunctionName(metaClass)
Returns the name of a 'tp_getattro' method for a given class.
|
|
|
|
| |
Reviewed by Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
|
| |
Generated code now makes use of the new convenience classes instead
of directly using the Python provided PyGILState_STATE and PyThreadState.
|
|
|
|
|
|
|
|
|
|
| |
The code to write the definition of cppSelf was in two places and
contained an #ifdef clause, now it is a writer method.
Also added the ShibokenGenerator::cppSelfVariableName() method
to be used instead of directly writing the "cppSelf" string.
Updated custom code on test binding to remove warning.
Reviewed by Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
| |
It checks if a meta type should be dereferenced by the Python method
wrapper passing it to C++.
ShibokenGenerator::shouldDereferenceArgumentPointer now calls the new
method.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The previous behaviour was to pass the result, if any, straight to
the to-Python-converter method. Separating the C++ from the Python
part allows us to release the thread lock when calling C++ and taking
it back before calling the converter filled with Python calls.
Also renamed "retvalVariableName()" to the more meaninful name
"pythonReturnVariableName()" and added "cppReturnVariableName()".
Also updated the type system variable replacement to recognize "%0" as
"cppReturnVariableName()".
|
|
|
|
| |
parameter.
|
|
|
|
|
|
|
| |
A NULL pointer in the "lastArg" parameter of writeCodeSnips means that
the function being processed will be called without arguments. The
behavior prior to this change was that a NULL lastArg indicates that
all arguments are to be used.
|
|
|
|
|
|
|
|
|
|
| |
You need to enable these extensions if you are generating a binding for a Qt-based library
and need to pass some types through the signal slots mechanism.
If you turn this flag on, you also need to link the generated bindings with the
libpyside, besides add libpyside include path to your project.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
|
|
|
| |
modifications.
|
|
|
|
| |
Reviewed by Hugo Lima <hugo.lima@openbossa.org>
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
|
|
|
|
|
| |
Added cpythonIsConvertibleFunction(const AbstractMetaType*) to
ShibokenGenerator to generate "isConvertible" checks that adds
the pointer sign '*' to value pointers and object types.
|
|
|
|
|
| |
When enabled, this heuristic will check every constructor for an argument named "parent",
if the argument is a pointer, then it'll be the parent of this object.
|
|\ |
|
| |
| |
| |
| |
| | |
which returns a boolean indicating if there are cases of multiple inheritance
in any of its ancestors.
|
| |
| |
| |
| |
| | |
return an AbstractMetaClassList (AbstractMetaClass does not
provide such a method)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
now receive the multiple inheritance information, the initialization
function will be that of the first ancestor that have multiple
inheritance.
Example:
class MDerived : public Base1, public Base2
clas SonOfMDerived : public MDerived
MDerived defines the function PyMDerived_mi_init to register the
multiple inheritance information, and SonOfMDerived just uses the
ancestor function.
|
| | |
|
| |
| |
| |
| |
| | |
Used only by boostpythongenerator and remained untouched after the
Shiboken fork.
|