summaryrefslogtreecommitdiff
path: root/codemaker/source/codemaker/codemaker.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'codemaker/source/codemaker/codemaker.cxx')
-rw-r--r--codemaker/source/codemaker/codemaker.cxx87
1 files changed, 0 insertions, 87 deletions
diff --git a/codemaker/source/codemaker/codemaker.cxx b/codemaker/source/codemaker/codemaker.cxx
index 2ed28e12da34..c9f7e0b7f53c 100644
--- a/codemaker/source/codemaker/codemaker.cxx
+++ b/codemaker/source/codemaker/codemaker.cxx
@@ -62,93 +62,6 @@ rtl::OString convertString(rtl::OUString const & string) {
return s;
}
-codemaker::UnoType::Sort decomposeAndResolve(
- rtl::Reference< TypeManager > const & manager, rtl::OString const & type,
- bool resolveTypedefs, bool allowVoid, bool allowExtraEntities,
- RTTypeClass * typeClass, rtl::OString * name, sal_Int32 * rank,
- std::vector< rtl::OString > * arguments)
-{
- OSL_ASSERT(typeClass != 0 && name != 0 && rank != 0 && arguments != 0);
- *rank = 0;
- for (rtl::OString t(type);;) {
- sal_Int32 n = 0;
- *name = codemaker::UnoType::decompose(t, &n, arguments);
- if (n > SAL_MAX_INT32 - *rank) {
- throw CannotDumpException("Bad type information: " + b2u(type));
- //TODO
- }
- *rank += n;
- if (n > 0) {
- allowVoid = false;
- allowExtraEntities = false;
- }
- codemaker::UnoType::Sort sort = codemaker::UnoType::getSort(*name);
- switch (sort) {
- case codemaker::UnoType::SORT_VOID:
- if (!allowVoid) {
- throw CannotDumpException("Bad type information: " + b2u(type));
- //TODO
- }
- default:
- checkNoTypeArguments(*arguments);
- *typeClass = RT_TYPE_INVALID;
- return sort;
-
- case codemaker::UnoType::SORT_COMPLEX:
- typereg::Reader reader(manager->getTypeReader(*name));
- *typeClass = reader.getTypeClass();
- switch (*typeClass) {
- case RT_TYPE_ENUM:
- case RT_TYPE_INTERFACE:
- checkNoTypeArguments(*arguments);
- return sort;
-
- case RT_TYPE_STRUCT:
- if (!(allowExtraEntities && arguments->empty())
- && (arguments->size() > SAL_MAX_UINT16
- || (static_cast< sal_uInt16 >(arguments->size())
- != reader.getReferenceCount())))
- {
- throw CannotDumpException("Bad type information: " + b2u(type));
- //TODO
- }
- return sort;
-
- case RT_TYPE_MODULE:
- case RT_TYPE_EXCEPTION:
- case RT_TYPE_SERVICE:
- case RT_TYPE_SINGLETON:
- case RT_TYPE_CONSTANTS:
- if (!allowExtraEntities) {
- throw CannotDumpException("Bad type information: " + b2u(type));
- //TODO
- }
- checkNoTypeArguments(*arguments);
- //TODO: check reader for consistency
- return sort;
-
- case RT_TYPE_TYPEDEF:
- checkNoTypeArguments(*arguments);
- if (reader.getSuperTypeCount() == 1
- && reader.getFieldCount() == 0
- && reader.getMethodCount() == 0
- && reader.getReferenceCount() == 0)
- {
- if (resolveTypedefs) {
- t = convertString(reader.getSuperTypeName(0));
- continue;
- } else {
- return sort;
- }
- }
- default:
- throw CannotDumpException("Bad type information: " + b2u(type));
- //TODO
- }
- }
- }
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */