aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetabuilder.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-03-29 19:13:25 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:09:58 -0300
commit458735ffaf282cf703698a86ec54f25a0df077d9 (patch)
tree43bdff0a4772db82578fdbb9c9ab52285740e0cb /abstractmetabuilder.cpp
parent53c64681f115bfecf7dbdef8de905d25aa3dc301 (diff)
Do not add an operator function to a class from a referred type system.
API Extractor does not add operator functions from the module being processed for generation to a class belonging to a referred module, that should not be generated.
Diffstat (limited to 'abstractmetabuilder.cpp')
-rw-r--r--abstractmetabuilder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index 6fd7f46a1..211c82a41 100644
--- a/abstractmetabuilder.cpp
+++ b/abstractmetabuilder.cpp
@@ -170,7 +170,8 @@ void AbstractMetaBuilder::traverseOperatorFunction(FunctionModelItem item)
baseoperandClass = argumentToClass(arguments.at(0));
if (arguments.size() == 1) {
unaryOperator = true;
- } else if (!baseoperandClass) {
+ } else if (!baseoperandClass
+ || !(baseoperandClass->typeEntry()->codeGeneration() & TypeEntry::GenerateTargetLang)) {
baseoperandClass = argumentToClass(arguments.at(1));
firstArgumentIsSelf = false;
}
@@ -190,7 +191,7 @@ void AbstractMetaBuilder::traverseOperatorFunction(FunctionModelItem item)
// not of the same type of its owning class we suppose that it
// must be an reverse operator (e.g. CLASS::operator(TYPE, CLASS)).
// All operator overloads that operate over a class are already
- // beign added as member functions of that class by the API Extractor.
+ // being added as member functions of that class by the API Extractor.
arguments.pop_back();
metaFunction->setArguments(arguments);
metaFunction->setReverseOperator(true);