aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Optimize isCppPrimitive function.Hugo Parente Lima2012-03-091-27/+7
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Added setTargetLangPackage and targetLangPackage methods to PrimitiveTypeEntry.sb-0.10.6Marcelo Lira2012-03-091-2/+15
| | | | | | | Updated tests. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Lauro Moura <lauro.neto@openbossa.org>
* Included the unsigned types in TypeEntry::isCppPrimitive() method list of types.Marcelo Lira2012-03-091-1/+3
| | | | Also added a test for a typedef of an unsigned numerical type.
* Fix bug 731 - "Can't specify more than a single 'since' argument"Hugo Parente Lima2012-03-091-13/+23
|
* Set code generation flags on TypeSystem type entry.Hugo Parente Lima2012-03-091-0/+1
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Added default constructor option for value types.Marcelo Lira2012-03-091-7/+34
| | | | | | | | The unit test is in place and the 'value-type' tag documentation was update with information about the 'default-constructor' attribute. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Fixed TypeEntry::isCppPrimitive() to process typedefs and "long long" type.Marcelo Lira2012-03-091-2/+7
| | | | And added an unit test.
* Added revision attribute to type entries tags and flags-revision to ↵Hugo Parente Lima2012-03-091-2/+10
| | | | | | | enum-type tag. These attributes will be useful to separate the wrapped API in revisions and ease the task of producing ABI compatible bindings.
* Fix bug 417 - "Support nested naming of flags"Hugo Parente Lima2012-03-091-3/+12
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
* Removed warning about unused variable when using gcc 4.6.Hugo Parente Lima2012-03-091-4/+1
|
* Added support for module extra includes.Marcelo Lira2012-03-091-0/+1
| | | | | | | Unit tests were also added. Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Added a depth counter to avoid segmentation faults when discarding type entries.Marcelo Lira2012-03-091-9/+18
| | | | | | | And an unit test was added. Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Type system parser has now the ability to ignore entries as demanded by the ↵Marcelo Lira2012-03-091-0/+39
| | | | | | | | | | | | | | | | | | | | user. The entries that could be dropped are: * Object and Value types * Global functions * Namespaces * Enums The entry name must be fully qualified with scope items separated by a dot (.) and beginning with the module/package name. Example: to drop the class "Bar" inside the namespace "Foo" from the "Pkg" package specify it with: "Pkg.Foo.Bar". TODO: The parser will later complain that dropped entries found on the headers are not found in the type system. That's obviously incorrect, but to fix it all the type entries should store the name of the package from where the came. And that's a needed improvement!
* Uncomment usefull code to get reference-count action attribute work again ↵Hugo Parente Lima2012-03-091-2/+2
| | | | | | | for all values. Reviewer: Renato Araújo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Global functions can now be renamed.Marcelo Lira2012-03-091-0/+14
| | | | | | | | This is accomplished via the "rename" attribute on the "function" tag. An unit test was added and the documentation updated. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Renamed the "define-ownership" tag "calss" attribute value from "shell" to ↵sb-0.9.1Marcelo Lira2012-03-091-1/+1
| | | | | | | | | | | "native". This was done to keep consistency with the rest of the type system tag attributes, which use "native" instead of "c++" or "shell". Documentation was updated accordingly. Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Added the 'remove' attribute to the 'modify-field' type system tag.Marcelo Lira2012-03-091-12/+22
| | | | | Also created a static convenience function to process the 'remove' attribute content and set the error message if needed.
* Fixes spelling on warning message.Marcelo Lira2012-03-091-1/+1
|
* Fix TypeEntry::isCppPrimitive to return true on void types.Hugo Parente Lima2012-03-091-1/+1
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Add helper method TypeEntry::isCppPrimitive.Hugo Parente Lima2012-03-091-0/+16
| | | | | | | Returns true is the type is a primitive C++ type. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
* Implemented support to added functions for TypeAlias.sb-0.8.1renatofilho2012-03-091-1/+1
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
* Implement support to target conversion.renatofilho2012-03-091-10/+16
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Adds support for nested type declarations on the type system file.Marcelo Lira2012-03-091-66/+74
| | | | | | | | | | | | | | | Instead of: <enum-type name="Foo::Bar"/> <value-type name="Foo"/> the nested version could be used: <value-type name="Foo"> <enum-type name="Bar"/> </value-type> The old usage is still allowed.
* Anonymous enums now supported.Marcelo Lira2012-03-091-0/+11
|
* Fixed function modification propagation.Renato Filho2012-03-091-0/+31
| | | | | | | Now all modifications on base function will be propagate until a new modification was found. Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Lauro Moura <lauro.neto@openbossa.org>
* Fixed memory leak.Renato Filho2012-03-091-2/+2
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Fixed tag processing to accept "inject-code" as child tag of "add-function".Marcelo Lira2012-03-091-1/+2
| | | | | Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Put back variable-name in 'reference-count' tag.Renato Filho2012-03-091-0/+2
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Implemented support to "rename to" in argument modificationRenato Filho2012-03-091-5/+9
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>, Marcelo Lira <marcelo.lira@openbossa.org>
* Added the "default-constructor" attribute to the "primitive-type" tag.Marcelo Lira2012-03-091-0/+3
| | | | | | | | | The default-constructor attribute specifies a way to build an instance of a class declared as primitive type using default arguments. Documentation and a test were also added. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Implemented support to flag "since" on typesystem.Renato Filho2012-03-091-34/+54
| | | | | With this flag you can specify after which version the tag became valid.
* Do not generate bindings for global functions when the typesystem was loaded ↵Hugo Parente Lima2012-03-091-0/+1
| | | | | | | with generate=no. Reviewer: Lauro Moura <lauro.neto@openbossa.org> Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
* TypeDatabase class moved to its own header/cpp.Hugo Parente Lima2012-03-091-398/+48
|
* Added the "function" tag to ApiExtractor.Hugo Parente Lima2012-03-091-1/+38
| | | | | | | | | | | | | | | This change the behaviour of ApiExtractor regarding to global functions. All global function you want to be exported to python *need* to be especified in the type system with the function tag, otherwise they wont be exported at all. The syntax for this new tag is: <function signature="..." /> This is just the initial work for this tag, it is missign support for: - Function modifications. - Add a function overload with add-function tag.
* Include class moved to its own .h/.cpp file.Hugo Parente Lima2012-03-091-24/+0
|
* Added qHash, operator<<(QTextStream,Include) and operator== to class Include.Hugo Parente Lima2012-03-091-0/+12
|
* Added ContainerTypeEntry::typeName() method.Hugo Parente Lima2012-03-091-0/+33
| | | | | | | | With this method we can get the string used in typesystem to declare the container type (list, set, map, pair, etc). Reviewer: Lauro Moura <lauro.neto@openbossa.org> Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
* Remove some java-oriented stuff from ApiExtractor inherited from QtJambi ↵Hugo Lima2012-03-091-32/+6
| | | | | | | generator. Reviewer: Lauro Moura <lauro.neto@openbossa.org> Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
* Fixed error checking about already existing conversion rules.Marcelo Lira2010-03-181-5/+4
| | | | | | | | | The error checking that avoids duplicated conversion rules definitions applies only to general type conversions, not to cases specified to a function argument. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Lauro Moura <lauro.neto@openbossa.org>
* Fix add-function tag when adding a global function.Hugo Lima2010-02-091-7/+12
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Reactivated 'reference-count' tag.Marcelo Lira2010-02-091-12/+4
| | | | | | | | The type system tag '<reference-count action="Add|Remove|..."/>' used on argument modification was uncommented, documentation was written and a unit test was created for it. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
* Assumes utf-8 encoding for conversion rules stored in external files.Hugo Lima2010-02-081-2/+2
| | | | Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Code injection from external files are always read using UTF-8.Hugo Lima2010-02-081-4/+3
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Correctly search for typesystem in all available typesystem paths.Hugo Lima2010-01-081-8/+5
| | | | Reviewed by Lauro Moura <lauro.neto@openbossa.org>
* Added function can be tagged as static methods.Hugo Lima2010-01-071-0/+2
| | | | Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Adds support for varargs in AbstractMetaArgument, AbstractMetaType and ↵Marcelo Lira2009-12-161-3/+10
| | | | | | VarargsTypeEntry. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
* Adds normalizedSignature static method to TypeDatabase.Marcelo Lira2009-12-161-2/+20
| | | | | | | | | | | All the uses of QMetaObject::normalizedSignature were replaced to use TypeDatabase::normalizedSignature; the former always changes the unsigned primitives to the shorter versions (e.g. "unsigned int" becomes "uint") that aren't necessarily used by the parsed library. The new normalizer changes back "uNUMBER" to "unsigned NUMBER" if the former is not present in the TypeDatabase. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
* Adds support for module level 'add-function' tag.Marcelo Lira2009-12-161-2/+31
| | | | | | | | | The TypeDatabase now stores global added functions as well as function modifications. The AbstractMetaFunction::modifications method was improved to check for global modifications. The test suite was updated with the changes.
* Fixed support for modify args in add-function tag.renato2009-12-081-1/+2
| | | | | | Created tests. Reviewed by Hugo Lima <hugo.lima@openbossa.org>
* Do not export global variables used only in typesystem.cpp.Hugo Lima2009-11-201-7/+49
|