summaryrefslogtreecommitdiff
path: root/idlc/source/idlc.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-04-19 12:46:00 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-04-19 12:46:00 +0000
commit58eebcdb3f71997321fe397e46e6eb9361816953 (patch)
treef2cfc04cc1a89cf798fae9274eb3d7a5fb32f6ad /idlc/source/idlc.cxx
parent606f2a0550beae8de89acde1d130f8b88033cf3b (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.cxx27
1 files changed, 25 insertions, 2 deletions
diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx
index 619267329740..fd32729ba145 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);