From 4806c1415566210a876e98c768da87a759982e2e Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 19 Apr 2006 12:46:00 +0000 Subject: INTEGRATION: CWS sb49 (1.6.18); FILE MERGED 2006/03/15 16:21:32 sb 1.6.18.1: #i62098# Added check that no two service ctors have the same signature; along the way, added some helper functions and some missing const qualifiers. --- idlc/source/idlc.cxx | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'idlc/source/idlc.cxx') diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx index a5ce83f1a..e07ecbd13 100644 --- a/idlc/source/idlc.cxx +++ b/idlc/source/idlc.cxx @@ -4,9 +4,9 @@ * * $RCSfile: idlc.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: rt $ $Date: 2005-09-07 18:11:08 $ + * last change: $Author: hr $ $Date: 2006-04-19 13:46:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -70,6 +70,7 @@ #include #endif #include "idlc/astdeclaration.hxx" +#include "idlc/astsequence.hxx" #include "idlc/asttype.hxx" #include "idlc/asttypedef.hxx" @@ -286,6 +287,28 @@ AstDeclaration const * resolveTypedefs(AstDeclaration const * type) { return type; } +AstDeclaration const * deconstructAndResolveTypedefs( + AstDeclaration const * type, sal_Int32 * rank) +{ + *rank = 0; + for (;;) { + if (type == 0) { + return 0; + } + switch (type->getNodeType()) { + case NT_typedef: + type = static_cast< AstTypeDef const * >(type)->getBaseType(); + break; + case NT_sequence: + ++(*rank); + type = static_cast< AstSequence const * >(type)->getMemberType(); + break; + default: + return type; + } + } +} + AstInterface const * resolveInterfaceTypedefs(AstType const * type) { AstDeclaration const * decl = resolveTypedefs(type); OSL_ASSERT(decl->getNodeType() == NT_interface); -- cgit v1.2.3