aboutsummaryrefslogtreecommitdiffstats
path: root/shibokengenerator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug#316 - "QAbstractItemModel.createIndex is broken"Hugo Parente Lima2010-09-011-14/+15
| | | | | | | | | | | | | | Use SbkNumber_Check instead of PyNumber_Check, because PyNumber_Check returns true for all user types. This commit also disable the generation of _Check macros and replaces all entries with Converter<T>::checkType. Those changes are on the same commit because SbkNumber_Check conflicts with a macro generated by "other" binding which binds a type named "Number". Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
* Get ride of PyMODINIT_FUNC, since it doesn't correctly set the visibility ↵Hugo Parente Lima2010-08-191-5/+0
| | | | | | | rules on Linux. Reviewer: Renato Araújo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Added function to check if a function visibility was changed to private.Marcelo Lira2010-08-041-1/+10
|
* Create a new copy from object when convert from PyObject to const ref.Renato Filho2010-07-271-19/+10
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Fixed memory leak.Renato Filho2010-07-231-1/+4
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Enable support for NativePointer type (eg.: void *, QChar *, etc)Luciano Wolf2010-07-131-2/+8
| | | | | Reviewer: Renato Araújo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Create referenceMap on demand.Renato Filho2010-07-091-24/+0
| | | | | | | Implemented 'variable-name' support on 'reference-count' tag. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Remove old code inherited from boost python generator.Hugo Parente Lima2010-07-091-12/+1
|
* Adapt to recent changed in ApiExtractor API.Hugo Parente Lima2010-07-091-3/+3
|
* Implemented support to properties.Renato Filho2010-07-081-0/+6
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
* Do not write setters for const fields.Hugo Parente Lima2010-07-011-1/+1
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Fixed scope for class fields.Renato Filho2010-06-251-5/+3
|
* Generate cpp file with "using namespace ..." if class inside ofRenato Filho2010-06-251-16/+29
| | | | | | | namespace. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente <hugo.lima@openbossa.org>
* Adds support for named arguments in function calls.Marcelo Lira2010-06-171-3/+1
| | | | | Only C++ arguments with default values will be turned into Python named arguments.
* Added method fullPythonFunctionName(func) to ShibokenGenerator.Marcelo Lira2010-06-171-0/+17
| | | | | | It accepts an AbstractMetaFunction and returns the full name in Python, including the module namespace. E.g.: "sample.SimpleFile.exists"
* Added method to guess scope of function argument default values.Marcelo Lira2010-06-151-0/+106
| | | | | | | 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.
* Added Converter<T>::checkType.Hugo Parente Lima2010-06-091-12/+34
| | | | | | 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.
* Added support for protected fields when not using the "protected hack".Marcelo Lira2010-06-031-0/+10
| | | | Tests were also added.
* Fixes code generation for classes with private destructors.Marcelo Lira2010-06-021-2/+17
| | | | | | This fix is specific for the cases when the "protected hack" is turned off. Also added some tests.
* Generator improved to handle protected enums without the protected hack.Marcelo Lira2010-06-021-3/+24
|
* API fixes.Renato Filho2010-05-181-1/+0
| | | | | | | | | * 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>
* Use translateTypeForWrapperMethod for all types.Hugo Parente Lima2010-04-291-9/+2
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Reviewer: Renato Araújo <renato.araujo@openbossa.org>
* Known what flag to use on PyBuildValue when a container is used.Hugo Parente Lima2010-04-291-0/+1
|
* Fixed refcount leak on virtual functions args.Renato Filho2010-04-291-4/+5
| | | | | Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
* Add include headers of global enums.Hugo Parente Lima2010-04-221-0/+1
|
* Add extra options for ShibokenGenerator::writeBaseConversion.Hugo Parente Lima2010-04-051-4/+5
|
* Updated ShibokenGenerator::injectedCodeHasReturnValueAttribution.Marcelo Lira2010-03-221-5/+11
| | | | | The method now checks native code injections instead of only target language code.
* Adds ShibokenGenerator::buildAbstractMetaTypeFromString.Marcelo Lira2010-03-191-3/+44
| | | | | | | 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.
* Allow hash-function tag to be definied in object-types (Fix bug #186).Hugo Lima2010-03-191-1/+4
|
* Changed the semantic of Converter<T>::isConvertible method.Hugo Lima2010-03-181-2/+12
| | | | | | | | | 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.
* Object-types are not copyable at all.Hugo Lima2010-03-181-1/+1
|
* Adds convenience methods to return the name of extended conversion functions.Marcelo Lira2010-03-021-0/+10
| | | | | | | | 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.
* Adds ShibokenGenerator::getExtendedConverters() method.Marcelo Lira2010-03-021-0/+21
| | | | | | 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.
* Shiboken generator now supports references to pointers as arguments.Marcelo Lira2010-02-261-1/+3
| | | | | | | Two methods with references to object type and value type pointers were added to BlackBox test class just to check the compilation. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
* The C++ pointer for a Python wrapper is now acquired using a Converter.Marcelo Lira2010-02-241-1/+2
| | | | | | | 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>
* Adds method ShibokenGenerator::getAllAncestors(metaClass)Marcelo Lira2010-02-241-0/+11
| | | | The new method returns a flat list of all the given class' ancestors.
* Add writeToCppConversion overload with AbstractMetaClass instead of ↵Hugo Lima2010-02-231-0/+7
| | | | | | AbstractMetaType. This is needed by hash function writer.
* Pass QStrings by const references instead of by value.Hugo Lima2010-02-231-8/+7
|
* Add support for "signed short" type (needed in QtCore.QTextStream)Luciano Wolf2010-02-231-0/+1
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* - Fix method writeTypeCheck, so it finally correct decides when to use ↵Hugo Lima2010-02-231-2/+3
| | | | | | | | PyNumber_Check or a more specific type check function. - Promote bool type as a specialization of int, as we do with float. Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Adds the convenience method 'isPairContainer' to ShibokenGenerator.Marcelo Lira2010-02-201-0/+6
| | | | | | | 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>
* Adds the convenience method 'isCString' to ShibokenGenerator.Marcelo Lira2010-02-201-2/+7
| | | | | It checks if an AbstractMetaType represents a C string. Also updated code to make use of the new method.
* Write a verbose error messages when the function arguments don't match.Hugo Lima2010-02-181-0/+9
| | | | | | | 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>
* Do not export Sbk*Type variables.Hugo Lima2010-02-121-0/+24
| | | | | | 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 method needsReferenceCountControl checks also in the class' ancestry.Marcelo Lira2010-02-121-2/+6
| | | | | | ShibokenGenerator::needsReferenceCountControl checks the object and all its ancestry for the need to support reference counting control of other objects pointed by the present class.
* Adds 2 convenience methods to ShibokenGenerator to check for refcount mods.Marcelo Lira2010-02-101-0/+20
| | | | | | The new expressively named methods hasMethodsWithReferenceCountModifications and needsReferenceCountControl returns boolean values to help generation of code for reference counting support.
* Adds some name generator methods to ShibokenGenerator.Marcelo Lira2010-02-101-0/+15
| | | | | | | Added the following self evident methods to ShibokenGenerator: * QString cpythonGettersSettersDefinitionName(const AbstractMetaClass*); * QString cpythonGetterFunctionName(const AbstractMetaField*); * QString cpythonSetterFunctionName(const AbstractMetaField*);
* Implement support to conversion rule.Renato Filho2010-02-091-4/+13
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Fixes generation of binding reimplementation of modified virtual methods.Marcelo Lira2010-02-091-2/+3
| | | | | Argument removal and type modification no longer affects the generation of virtual method signatures in the binding code.
* Implement ShibokenGenerator::isCopyable based on BoostPythonGeneratorAnderson Lizardo2010-02-041-0/+13
| | | | Reviewed by Renato Araújo <renato.filho@openbossa.org>