aboutsummaryrefslogtreecommitdiffstats
path: root/overloaddata.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed memory leak.Renato Filho2010-07-231-1/+1
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Added methods to check if overloads contain any argument with default values.Marcelo Lira2010-06-171-0/+45
| | | | | | | | | | | The hasArgumentWithDefaultValue methods from OverloadData returns true if any argument in the overloads or in the single function passed has a default value assigned to it. A non-static version of this method uses the overloads described by the OverloadData object. Also added the method getArgumentsWithDefaultValues(func) to return a list of the function's arguments that have default values.
* Modified some methods on OverloadData to accept references to function lists.Marcelo Lira2010-06-171-3/+3
| | | | | The methods originally accept copies of AbstractMetaFunctionLists, now they use references instead.
* Added method to OverloadData to return the list of overloads without repetition.Marcelo Lira2010-06-151-0/+16
| | | | | | | The method OverloadData::overloadsWithoutRepetition() returns the overload list of the OverloadData object removing "almost" duplicated functions. For our purposes "foo()" and "foo()const" means the same, so the constant version is removed.
* Fix bug #212Hugo Parente Lima2010-04-301-15/+34
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Reviewer: Renato Araújo <renato.araujo@openbossa.org>
* More descriptive warning message on OverloadData::sortNextOverloads().Marcelo Lira2010-03-261-4/+8
| | | | Also fixed some typos and imprecisions on comments.
* sortOverload function should use not use primitive types aliases.Hugo Lima2010-03-181-12/+35
| | | | | | | Also in this commit: enums now takes precedence over unsigned int and unsigned long. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Reviewer: Lauro Moura <lauro.neto@openbossa.org>
* Write enum checks before int, long and bool checks.Hugo Lima2010-03-181-2/+11
| | | | | | Enums are implicitly converted to these types in C++, if we dont do that the enum version of some functions can never be called, because the int one will be if the int check was written before the enum check.
* Remove boost::graph dependency from Shiboken generator.Hugo Lima2010-03-181-20/+26
|
* Generator noew handles implicit conversions that are conversion operators.Marcelo Lira2010-03-011-1/+5
| | | | | | Previously all implicit conversions were constructors, now they could be conversion operators, with no explicit arguments except for the owner class where they where defined.
* - Fix method writeTypeCheck, so it finally correct decides when to use ↵Hugo Lima2010-02-231-2/+6
| | | | | | | | 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>
* Added previousOverloadData attribute to OverloadData, so we cna walk on ↵Hugo Lima2010-02-191-2/+3
| | | | overload data tree.
* Modified signature of OverloadData::addOverloadData.Marcelo Lira2010-02-081-5/+5
| | | | | Changed the second argument from AbstractMetaType to AbstractMetaArgument, this helps to get the correct type replacement information for arguments.
* Fixing sort overloadLauro Neto2010-02-081-4/+27
| | | | | | Now sorting OverloadData recursively Reviewer: Renato Filho <renato.filho@openbossa.org>
* Fixed OverloadData::invalidArgumentLengths(), so it take care of removed ↵Hugo Lima2010-02-041-4/+11
| | | | | | arguments. Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Fixed overload function generation for fuctions with removed arguments.Renato Filho2010-02-011-2/+3
|
* Small refactoring to sortOverloads function, so it's a bit easier to read (IMO).Hugo Lima2010-01-201-24/+22
|
* Adds helpers to OverloadData to check for static and non-static methods.Marcelo Lira2010-01-191-0/+46
| | | | | | | OverloadDecisor received some new methods: hasStaticFunction, hasInstanceFunction and hasStaticAndInstanceFunctions. They are useful to check if an overload contains both static and non-static signatures.
* Adds OverloadData::hasAllowThread() method.Marcelo Lira2010-01-151-0/+9
| | | | | The method checks if any of the functions in OverloadData have allow-thread flag set to true.
* Adds OverloadData::hasVarargs() which says if there is a varargs argument ↵Marcelo Lira2009-12-181-0/+10
| | | | among the overloads.
* Fixed OverloadData::numberOfRemovedArguments(func, int finalArgPos).Marcelo Lira2009-11-261-5/+10
| | | | | | The parameter "finalArgPos" refers to a position in the modified function, when it is provided the removed argument counter must consider the removed arguments before the final position.
* Added convenience method OverloadData::isSingleArgument(overloads).Marcelo Lira2009-11-261-0/+12
|
* Add overload dependency on PyObjectLauro Neto2009-11-251-0/+14
| | | | | | PyObject_Check should be the last one in the overload type check Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Improve overload sortingLauro Neto2009-11-251-3/+24
| | | | | | | | | | Now adding a new dependency: If the overload type is a container or template and the contained type is also in the overload list, the contained type is checked first. Added due to QList<String> and QString. WARNING: Not sure yet if this is the best fix :)
* Renamed OverloadData::hasDefaultValue to ↵Marcelo Lira2009-11-231-5/+5
| | | | | | | | | OverloadData::getFunctionWithDefaultValue and modified it to return a pointer to the actual AbstractMetaFunction with the default value (or NULL if it doesn't has the value), instead of just returning a boolean. The overload decisor writer makes use of this new behavior to get the correct function for a method call with default values.
* Added methods to OverloadData:Marcelo Lira2009-11-201-0/+20
| | | | | | | | | | * OverloadData* headOverloadData() const; Return the root OverloadData object for the current OverloadData. * QStringList returnTypes() const; Returns a list of the possible return types for the current OverloadData. * bool hasNonVoidReturnType() const; Returns true if any of the overloads for the current OverloadData has a return type different from void.
* Fixed OverloadData::isFinalOccurrence method to consider removed arguments.Marcelo Lira2009-11-191-2/+7
|
* OverloadData does not ignore arguments which modify types.Hugo Lima2009-11-161-3/+28
|
* Sorting overloads topologicallyLauro Neto2009-11-101-26/+57
| | | | | | | | Instead of using the current weight-based overload sorting, sort them topologically based on implicit conversions. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
* Added support for reverse operators.Hugo Lima2009-11-101-6/+8
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* added the method OverloadData::findNextArgWithDefault() which returnsMarcelo Lira2009-11-061-0/+19
| | | | | | | the nearest occurrence of an argument with a default value. this could be used when the overload has only one signature and some of the arguments ahead could have default values leading to more than one way of calling the method.
* improved OverloadData class to sort the alternative arguments puttingMarcelo Lira2009-10-301-11/+37
| | | | | | the primitive types first and moving down the wrapper objects with more implicit converversions; this ordering scheme is needed to avoid unnecessary (and sometimes wrong) conversions
* renamed PolymorphicData class to OverloadData, this should represent correctlyMarcelo Lira2009-09-021-0/+383
the class' function; other relative renamings were also performed