| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
| |
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
|
| |
|
|\
| |
| |
| | |
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
| |
| |
| |
| |
| | |
references to object-type (which are supposed to be moved around as
pointers)
|
|/
|
|
|
|
| |
operator->,
the last one does not makes sense into python world.
|
|
|
|
|
| |
to TypeEntry* and added a convenience method that receives an
AbstractMetaType* and calls the new version of the method
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
|
|
|
|
| |
pointer character to value-type pointer strings, this fixes a problem
on the generation of toPython conversions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
which checks if an argument type should be dereferenced by the Python
method wrapper before calling the C++ method
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
QString to void since no one is using it anymore
|
|
|
|
|
|
| |
Generator class on (GeneratorRunner)
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
|
|
|
|
| |
on Generator (from GeneratorRunner); also corrected the type in the
method name (also corrected on the base Generator class)
|
|
|
|
|
|
|
|
| |
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 <hugo.lima@openbossa.org>
|
|
|
|
|
|
| |
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
|
|
|
|
| |
name if the argumentName parameter is not supplied
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This reverts commit 9835de882d806a809b96cdce98597156915fbb48.
|
|
|
|
|
|
| |
creating a new wrapper for the new value-type passed by value it
reuses an existing wrapper as is expected for a referenced value;
also fixed the collector_test.py
|
|
|
|
|
|
| |
were common value-types, the pointer is extracted only at the time of the
method call; this behavior is desired when an overloaded method has both
cases to decide upon, and it is natural to convert for the common case
|
|
|
|
|
| |
primitive types for they are used to decide equivalencies on the
ShibokenGenerator::isPyInt method
|
|
|
|
|
|
| |
This allow the user to full custommize the type conversion.
Note: This change added a known regression on test_derived
|
|
|
|
| |
dealt with to allow future expansions ("__call__", "__getattr__", etc)
|
|
|
|
|
| |
to improve code readability; also fixed usage of template variables
on type system for the test bindings
|
| |
|
|
|
|
|
| |
to ShibokenGenerator to retrieve a list of implicit constructors for the
given type
|
|
|
|
| |
This reverts commit 4213b0176ae9af91221dbe38e1dead10638ff054.
|
|
|
|
| |
This reverts commit 0953187f7b13b8ca410c8db8fa856154cc6729a8.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* %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
|
|
|
|
| |
of the type, and this instance must be freed after use.
|
|
|
|
|
|
| |
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 function names containing "::" (such as QTextCodec);
- Fix wrong method naming while generating CPython code;
- Fix inner classes code generation.
|
| |
|
|
|
|
| |
references with references to containers
|
| |
|
|
|
|
| |
a pointer to AbstractMetaFunction instead of a AbstractMetaArgumentList
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- Added a warning when no python operators can be found to a C++ operator.
- Added mapping from C++ operator[] to Python __getitem__
|
| |
|
|
|
|
|
|
|
| |
private destructors into account
- Removed ShibokenGenerator::canCreateWrapperFor(...) method
- Minor improvements to ShibokenGenerator documentation
- Expanded PrivateDtor case and added related unit test
|
|
|
|
| |
validity of 'type' and 'argumentName' arguments
|
|
|
|
| |
that uint is equals to unsigned int.
|
| |
|