diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-04-19 12:46:00 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-04-19 12:46:00 +0000 |
commit | 4806c1415566210a876e98c768da87a759982e2e (patch) | |
tree | 2d43caa62ede8b7f7aaea31bfac19e5f533faf0d /idlc/source/idlc.cxx | |
parent | 50494a820e5461bfb61c3018a467ad10530b12ed (diff) |
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.
Diffstat (limited to 'idlc/source/idlc.cxx')
-rw-r--r-- | idlc/source/idlc.cxx | 27 |
1 files changed, 25 insertions, 2 deletions
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 <idlc/astbasetype.hxx> #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); |