aboutsummaryrefslogtreecommitdiffstats
path: root/shibokengenerator.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Merged with multipleinheritance branchMarcelo Lira2009-11-251-1/+8
|\
| * Added the method ShibokenGenerator::hasMultipleInheritanceInAncestry(metaClass)Marcelo Lira2009-11-181-0/+3
| | | | | | | | | | which returns a boolean indicating if there are cases of multiple inheritance in any of its ancestors.
| * modified the unused method ShibokenGenerator::getBaseClasses toMarcelo Lira2009-11-181-1/+3
| | | | | | | | | | return an AbstractMetaClassList (AbstractMetaClass does not provide such a method)
| * Classes that have multiple inheritance in some point of its ancestryMarcelo Lira2009-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Added ShibokenGenerator::shouldGenerateCppWrapper(metaClass) method.Marcelo Lira2009-11-241-0/+4
| |
* | Removed unused method ShibokenGenerator::signatureForDefaultVirtualMethod.Marcelo Lira2009-11-231-6/+0
| | | | | | | | | | Used only by boostpythongenerator and remained untouched after the Shiboken fork.
* | Added the method injectedCodeCallsPythonOverride(func) toMarcelo Lira2009-11-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ShibokenGenerator, it returns true if a code injection on a virtual method override (a "native" inject-code) does a call to the Python override. Added the %PYTHON_METHOD_OVERRIDE type system variable, it is replaced by the name of the pointer to a Python method that represents an override to a C++ virtual method. A code injection in the "native/end" position for a method modification is now put before the dereferencing of the variables used in the Python call (the method object and the Python argument tuple). If a call to the Python override method is detected on code injections of the "native" class from method modifications, the generator doesn't write the same call again. All documentation was updated with the changes.
* | Added method ShibokenGenerator::injectedCodeUsesPySelf to checkMarcelo Lira2009-11-231-3/+11
| | | | | | | | | | | | | | if the user injected code uses the "%PYSELF" type system variable. This is useful to provide the Python wrapper pointer to native method code injections. Also updated the documentation comment for injectedCodeUsesCppSelf.
* | Added the method ShibokenGenerator::injectedCodeHasReturnValueAttributionMarcelo Lira2009-11-201-0/+8
| | | | | | | | | | | | that checks if a function returning 'void' needs to have the Python method wrapper return value set to Py_None. This happens when any of the other overloads for the function return type is different from 'void'.
* | Modified ShibokenGenerator::writeCodeSnips to receive also anMarcelo Lira2009-11-191-0/+2
|/ | | | | | | | | AbstractMetaArgument indicating the last C++ argument available (i.e. converted from Python arguments to C++) to be used in the type system variable replacement. If a variable in the user's custom code is not ready, it is replaced by the argument default value. Also updated the documentation.
* Added the %PYTHONTYPEOBJECT type system variable, which is replacedMarcelo Lira2009-11-171-2/+4
| | | | | | | | | by the proper Python type object depending on the context: method or class modification. Also added an AbstractMetaClass argument to ShibokenGenerator::writeCodeSnips to pass the needed context information. Reviewd by Luciano Wolf <luciano.wolf@openbossa.org>
* Add variables CONVERTTOPYTHO[###] and PYARG_# to code snips.Hugo Lima2009-11-161-0/+17
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* added two convenience methods to ShibokenGenerator that receiveMarcelo Lira2009-11-131-0/+17
| | | | | | AbstractMetaFunction; one tells if the function uses the %CPPSELF type system variable on its code snippets (if any), and the other says if there is a call to the wrapped C++ function in the code snippets
* Add visibility policies to libshiboken and for bindings generated by ↵Hugo Lima2009-11-121-0/+2
| | | | | | | | | | shiboken generator. As shiboken generator needs minor changes to support inter-module dependencies, these changes about symbol visibility does not support inter-module dependencies, however support it is simple, because we just need to make some symbols visible to other DSO's. Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Added support for reverse operators.Hugo Lima2009-11-101-1/+0
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* added boolean parameter checkExact to ShibokenGenerator::cpythonCheckFunctionMarcelo Lira2009-11-051-2/+2
| | | | | | forcing it to use the _CheckExact macro instead of the more permissive _Check; one use of this is to check if a parameter is of exact type enum if a C++ method that receives an enum
* modified ShibokenGenerator::cpythonIsConvertibleFunction argumentMarcelo Lira2009-11-041-1/+4
| | | | | to TypeEntry* and added a convenience method that receives an AbstractMetaType* and calls the new version of the method
* added the method ShibokenGenerator::shouldDereferenceArgumentPointer,Marcelo Lira2009-11-031-0/+3
| | | | | which checks if an argument type should be dereferenced by the Python method wrapper before calling the C++ method
* created a simpler version of ShibokenGenerator::writeBaseConversionMarcelo Lira2009-11-011-0/+2
| | | | | | | that receives a TypeEntry* and uses only the basic type, ignoring const, pointer or reference information; ShibokenGenerator::cpythonIsConvertibleFunction now calls this new version of writeBaseConversion
* changed ShibokenGenerator::writeBaseConversion return type fromMarcelo Lira2009-11-011-2/+2
| | | | QString to void since no one is using it anymore
* moved method ShibokenGenerator::implicitConversions to baseMarcelo Lira2009-10-301-3/+0
| | | | | | Generator class on (GeneratorRunner) Reviewed by Hugo Parente <hugo.lima@openbossa.org>
* removed method ShibokenGenerator::sortContructor, already implementedMarcelo Lira2009-10-301-1/+0
| | | | | on Generator (from GeneratorRunner); also corrected the type in the method name (also corrected on the base Generator class)
* added convenience methods to call ShibokenGenerator::cpythonWrapperCPtr;Marcelo Lira2009-10-301-0/+2
| | | | | | the base method now uses TypeEntry* instead of AbstractMetaClass* and checks if the TypeEntry represents a Value Type or an Object Type, if not it returns an empty QString
* modified ShibokenGenerator::writeBaseConversion to write only the functionMarcelo Lira2009-10-301-1/+1
| | | | name if the argumentName parameter is not supplied
* modified Converter<T>::isConvertible(PyObject*) to check only if the givenMarcelo Lira2009-10-301-2/+2
| | | | | Python object is convertible to the C++ type T, and not if it is of the same type as T (this is done by the standard PyTYPENAME_Check macros)
* the Python check macros are generated once again since it is aMarcelo Lira2009-10-301-1/+3
| | | | | | | | | | convention for every type to have the said macros; also, there are some situations where one needs to now if a type is of this or that kind, and not if it is convertible to other types; the two ShibokenGenerator::cpythonCheckFunction reverted to the previous behavior and the new stuff was moved to the methods ShibokenGenerator::cpythonIsConvertibleFunction, and the places from where they are called were changed accordingly
* changed the way that added special methods ("__str__", "__repr__") areMarcelo Lira2009-10-231-0/+3
| | | | dealt with to allow future expansions ("__call__", "__getattr__", etc)
* added the convenience method implicitConversions(const AbstractMetaType*)Marcelo Lira2009-10-231-0/+1
| | | | | to ShibokenGenerator to retrieve a list of implicit constructors for the given type
* Revert "The implicit conversions of value types generate a new instance"Marcelo Lira2009-10-231-1/+0
| | | | This reverts commit 0953187f7b13b8ca410c8db8fa856154cc6729a8.
* added two new variables for the type system template system:Marcelo Lira2009-10-211-0/+1
| | | | | | | | | | | | | | * %SELF, replaced by the variable name for the Python instance of a class method * %CPPOBJ, replaced by the pointer to the C++ object for the Python instance associated with the method where it appears the 'cpythonWrapperCPtr(const AbstractMetaClass*, QString)' method was moved from CppGenerator to ShibokenGenerator to be available for the type system variable replacement method; the test bindings for the libsample's SimpleFile class was updated to use the new type system variables
* The implicit conversions of value types generate a new instanceMarcelo Lira2009-10-021-0/+1
| | | | of the type, and this instance must be freed after use.
* Fix QTextCodec and QTextCodec::ConverterState generation:Luciano Wolf2009-09-221-0/+1
| | | | | | - Fix function names containing "::" (such as QTextCodec); - Fix wrong method naming while generating CPython code; - Fix inner classes code generation.
* modified ShibokenGenerator::getFormatUnitString signature to receiveMarcelo Lira2009-09-161-1/+1
| | | | a pointer to AbstractMetaFunction instead of a AbstractMetaArgumentList
* added suport to flag-like enums (aka QFlags)Marcelo Lira2009-09-161-0/+10
|
* - Implementation of some functions moved to .cppHugo Lima2009-09-081-17/+3
| | | | | - Added a warning when no python operators can be found to a C++ operator. - Added mapping from C++ operator[] to Python __getitem__
* fixed some typos on license platesBruno dos Santos de Araujo2009-09-021-1/+1
|
* - CppGenerator and HeaderGenerator modified to take classes withMarcelo Lira2009-09-021-3/+8
| | | | | | | private destructors into account - Removed ShibokenGenerator::canCreateWrapperFor(...) method - Minor improvements to ShibokenGenerator documentation - Expanded PrivateDtor case and added related unit test
* Changed generator to convert the method call results on wrapped methodsMarcelo Lira2009-09-011-1/+1
| | | | | | | | | | | | | | | | at each possible call, instead of receiving the return value in the C++ type and converting it later. Having the result value as a PyObject pointer avoids the problem of declaring the return value variable with a class that do not have a simple constructor. Example: "Foo resultValue;" is a problem when the only constructor for "Foo" is "Foo(int)". The above described problem is made worse with the addition of OddBool and OddBoolUser cases to the sample library. OddBool is registered as a primitive (and convertible) type, registered this way it is only available as a TypeEntry and a suitable constructor cannot possibly be found. This is different from Value and Object types for they become AbstractMetaClass objects and all constructor signatures can be queried.
* Shiboken ported to the new generator/apiextractor architeture.Hugo Lima2009-08-271-26/+12
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* moved specific CPython wrapper code from ShibokenGenerator::translateTypeMarcelo Lira2009-08-261-0/+5
| | | | to ShibokenGenerator::translateTypeForWrapperMethod
* The End Is the Beginning Is the EndMarcelo Lira2009-08-171-0/+213