path: root/headergenerator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* removed boostpythongenerator legacy commentMarcelo Lira2009-11-231-14/+0
* Adapt to changes in Generator interface.Hugo Lima2009-11-181-4/+1
| | | | Reviewed by Renato Araújo <>
* removed unused method HeaderGenerator::writeVirtualDispatcher;Marcelo Lira2009-11-121-31/+0
| | | | | | it was here since the fork from the boostpythongenerator Reviewed by Hugo Parente <>
* Add visibility policies to libshiboken and for bindings generated by ↵Hugo Lima2009-11-121-1/+20
| | | | | | | | | | 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 <>
* moved HeaderGenerator::writeConverterImpl to CppGenerator, i.e.Marcelo Lira2009-11-101-111/+0
| | | | | | | the converter implementations now are written in the proper wrapper class .cpp files instead of in the global module header Reviewed by Hugo Parente <>
* updated Python representation of C++ enums and flags (only QFlags at theMarcelo Lira2009-11-051-8/+6
| | | | | | | moment): the enum/flags numeric operators are shorter and only flags allow new instances to be created and the libshiboken Reviewd by Luciano Wolf <>
* Skip generation of unecessary wrapper classes.renato araujo oliveira2009-11-031-4/+4
| | | | Reviewed by Marcelo Lira <>
* improved and organized the workings of conversion templates: addedMarcelo Lira2009-11-031-55/+82
| | | | | | | | | | | | | | | | | | | | | ConverterBase from which the generic Converter<T> and the specific Converters inherit; two methods were added: * createWrapper: returns a new PyObject wrapper with the Python type information produced by the HeaderGenerator; this method is called by toPython when a not yet wrapped C++ object needs to be converted. * copyCppObject: copies a instance of a C++ class, usually created by a implicit conversion that needs to be passed to a C++ methods; could be more than one method with variants of the converted type (value, reference, pointer) that makes no difference to the Python wrapped class. The C++ arguments converted from Python arguments by the Python method wrapper are dealt with as pointers if they are object or value types. Abstract classes and object-types, whose copy constructor and operator= should be private, are declared as Converter<T*> instead of Converter<T> and inherit from ConverterBase<T*>, this avoids impossible tries to copy such objects.
* added "PyObject* createWrapper(const T* cppobj)" to the Converter structureMarcelo Lira2009-11-011-81/+72
| | | | | | | | | | | | | | | | | from libshiboken, other changes followed this improvement: * added a Converter<T*> specialization that inherits from Converter<T>; its toPython(const T* cppobj) method returns a existing Python wrapper and increments its refcount, or else it creates a new wrapper using the createWrapper method. Now createWrapper is the only method generated for Object Type conversions. * added a Converter<T&> specialization that inherits from Converter<T*> and just calls its parent's methods adapting them to C++ references. * added a base template class for C++ enums and flags conversions called Converter_CppEnum, it inherits from the base Conversion class. Now the HeaderGenerator need only to generate the Converter<ENUM>::createWrapper method. * all generated conversions now uses only the type name and no qualifiers (i.e. Object Type converters are declared Converter<TYPE> instead of Converter<TYPE*>
* modified overload method decisor to create an instance of a value-typeMarcelo Lira2009-10-301-0/+2
| | | | | | | | when a method that expects a reference for the value-type receives another type convertible to said value-type; the instance created is given to a std::auto_ptr object to be deleted at the end of the scope Reviewed by Hugo Parente Lima <>
* modified Converter<T>::isConvertible(PyObject*) to check only if the givenMarcelo Lira2009-10-301-8/+23
| | | | | 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/+6
| | | | | | | | | | 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
* Added Converter<T>::isConvertible to replace the T_Check functions.Hugo Lima2009-10-271-19/+20
| | | | | | This allow the user to full custommize the type conversion. Note: This change added a known regression on test_derived
* Dont generate conversion rules for types with user definied conversion rules.Hugo Lima2009-10-271-0/+2
* Fix shiboken, so it can use the new conversion rule API from APIExtractor.Hugo Lima2009-10-261-13/+4
* Revert "modified the generator do deal with all value type conversions in"Marcelo Lira2009-10-231-12/+6
| | | | This reverts commit 4213b0176ae9af91221dbe38e1dead10638ff054.
* modified the generator do deal with all value type conversions inMarcelo Lira2009-10-011-6/+12
| | | | | | the same manner as it does with object types, in other words using pointers instead of copies when converting the Python wrappers to C++
* Fix QTextCodec and QTextCodec::ConverterState generation:Luciano Wolf2009-09-221-5/+11
| | | | | | - Fix function names containing "::" (such as QTextCodec); - Fix wrong method naming while generating CPython code; - Fix inner classes code generation.
* generated converters uses 'const' for all Object-Type parametersMarcelo Lira2009-09-161-2/+8
* added suport to flag-like enums (aka QFlags)Marcelo Lira2009-09-161-3/+8
* Removed useless ValueHolder template.Hugo Lima2009-09-151-8/+8
* Fix file name of class wrappers for inner classes.Hugo Lima2009-09-101-1/+1
* Do not create implicity conversions for ctors removed by typesystem.Hugo Lima2009-09-101-2/+5
* 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-12/+7
| | | | | | | private destructors into account - Removed ShibokenGenerator::canCreateWrapperFor(...) method - Minor improvements to ShibokenGenerator documentation - Expanded PrivateDtor case and added related unit test
* generated headers now include headers defined on type system file for ↵Marcelo Lira2009-09-011-1/+10
| | | | primitive types
* Removed inline implementations from inside Converters to avoid theHugo Lima2009-08-281-81/+92
| | | | | | creation of specialized templates just a few lines after Reviewed by Marcelo Lira <>
* writes the virtual qualifier for a method on wrapper header fileMarcelo Lira2009-08-261-1/+4
* The End Is the Beginning Is the EndMarcelo Lira2009-08-171-0/+412