From 458735ffaf282cf703698a86ec54f25a0df077d9 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Mon, 29 Mar 2010 19:13:25 -0300 Subject: 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. --- abstractmetabuilder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'abstractmetabuilder.cpp') 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); -- cgit v1.2.3