summaryrefslogtreecommitdiff
path: root/codemaker/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-08 08:45:37 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-09 09:44:33 +0200
commit02a8e8acd1f0cbb512868fd9849363f9d069db95 (patch)
treece8a68631b45d663d583646c89d3aaaeb2a4e402 /codemaker/inc
parent209d6a0fcca942a0168eb10ca3ab8f5f0d2ba9be (diff)
[API CHANGE] WIP: Experimental new binary type.rdb format
Make cppumaker work on top of unoidl/ instead of registry/, as a first step to change all the various codemakers. * API CHANGE: cppumaker no longer supports the -B switch, as that is meaningless with the new format. When reading from an old-format .rdb file, /UCR is hard-coded as the prefix now. * TODO: The new format does not yet support deprecation annotations, so the generated .hdl/.hpp files lack any SAL_DEPRECATED_INTERNALs for now. * codemaker/typemanager.hxx is extended with access to unoidl/ functionality, so the various codemakers can use registry/ and unoidl/ in parallel for now. The access to registry/ functionality will be removed. (Added small throwaway helper functions u2b/b2u to easily map between OString and OUString at the remaining seams for now.) * Includes a selective revert of ba044b1e9613ed30906a9a540b7da8392923e4e3 "remove needless forward rtl::OUString declarations" in those parts of codemaker, unodevtools, unoidl that were covered by this local work-in-progress patch; I would otherwise have hard a hard time re-applying it. * The generated .hdl/.hpp files are mostly unchanged, except for a few minor things: ** Any SAL_DEPRECATED_INTERNALs are missing (see above). ** In comprehensive getCppuType definitions, some members were erroneously classified as TypeCalss_UNKNOWN. ** In comprehensive getCppuType definitions, some unnecessary calls like ::cppu::UnoType< ::sal_Int32 >::get(); can be removed. ** For typedef sequence<X>, the .hdl file need not include X.hdl, but only needs to forward-declare it. ** Unnecessary includes for optional bases of interfaces can be removed. ** Some numbering of local variable names (sMethodName1, ...) has changed. Change-Id: Icad98f248ac15177337f1b4ab709a755a8af6238
Diffstat (limited to 'codemaker/inc')
-rw-r--r--codemaker/inc/codemaker/codemaker.hxx12
-rw-r--r--codemaker/inc/codemaker/commoncpp.hxx12
-rw-r--r--codemaker/inc/codemaker/commonjava.hxx8
-rw-r--r--codemaker/inc/codemaker/dependencies.hxx148
-rw-r--r--codemaker/inc/codemaker/exceptiontree.hxx27
-rw-r--r--codemaker/inc/codemaker/global.hxx64
-rw-r--r--codemaker/inc/codemaker/options.hxx18
-rw-r--r--codemaker/inc/codemaker/typemanager.hxx53
-rw-r--r--codemaker/inc/codemaker/unotype.hxx48
9 files changed, 139 insertions, 251 deletions
diff --git a/codemaker/inc/codemaker/codemaker.hxx b/codemaker/inc/codemaker/codemaker.hxx
index 52ae0016d27c..a1c3a14eea6c 100644
--- a/codemaker/inc/codemaker/codemaker.hxx
+++ b/codemaker/inc/codemaker/codemaker.hxx
@@ -28,17 +28,21 @@
#include <vector>
+namespace rtl {
+ class OString;
+ class OUString;
+}
class TypeManager;
namespace codemaker {
-OString convertString(OUString const & string);
+rtl::OString convertString(rtl::OUString const & string);
codemaker::UnoType::Sort decomposeAndResolve(
- rtl::Reference< TypeManager > const & manager, OString const & type,
+ rtl::Reference< TypeManager > const & manager, rtl::OString const & type,
bool resolveTypedefs, bool allowVoid, bool allowExtraEntities,
- RTTypeClass * typeClass, OString * name, sal_Int32 * rank,
- std::vector< OString > * arguments);
+ RTTypeClass * typeClass, rtl::OString * name, sal_Int32 * rank,
+ std::vector< rtl::OString > * arguments);
}
diff --git a/codemaker/inc/codemaker/commoncpp.hxx b/codemaker/inc/codemaker/commoncpp.hxx
index 4f81f98fff23..3cfd7133c0f1 100644
--- a/codemaker/inc/codemaker/commoncpp.hxx
+++ b/codemaker/inc/codemaker/commoncpp.hxx
@@ -33,11 +33,11 @@ namespace codemaker { namespace cpp {
Use common namespace aliases instead of fully specified (nested)
namespace. currently replaces com::sun::star with css.
*/
-OString scopedCppName(OString const & type, bool ns_alias=true);
+rtl::OString scopedCppName(rtl::OString const & type, bool ns_alias=true);
-OString translateUnoToCppType(
+rtl::OString translateUnoToCppType(
codemaker::UnoType::Sort sort, RTTypeClass typeClass,
- OString const & nucleus, bool shortname);
+ rtl::OString const & nucleus, bool shortname);
enum IdentifierTranslationMode {
ITM_GLOBAL,
@@ -45,10 +45,10 @@ enum IdentifierTranslationMode {
ITM_KEYWORDSONLY
};
-OString translateUnoToCppIdentifier(
- OString const & identifier, OString const & prefix,
+rtl::OString translateUnoToCppIdentifier(
+ rtl::OString const & identifier, rtl::OString const & prefix,
IdentifierTranslationMode transmode = ITM_GLOBAL,
- OString const * forbidden = 0);
+ rtl::OString const * forbidden = 0);
} }
diff --git a/codemaker/inc/codemaker/commonjava.hxx b/codemaker/inc/codemaker/commonjava.hxx
index f2e77ee9d1fa..26c87e123fdb 100644
--- a/codemaker/inc/codemaker/commonjava.hxx
+++ b/codemaker/inc/codemaker/commonjava.hxx
@@ -24,12 +24,12 @@
namespace codemaker { namespace java {
-OString translateUnoToJavaType(
+rtl::OString translateUnoToJavaType(
codemaker::UnoType::Sort sort, RTTypeClass typeClass,
- OString const & nucleus, bool referenceType);
+ rtl::OString const & nucleus, bool referenceType);
-OString translateUnoToJavaIdentifier(
- OString const & identifier, OString const & prefix);
+rtl::OString translateUnoToJavaIdentifier(
+ rtl::OString const & identifier, rtl::OString const & prefix);
} }
diff --git a/codemaker/inc/codemaker/dependencies.hxx b/codemaker/inc/codemaker/dependencies.hxx
deleted file mode 100644
index 47e5e249c48f..000000000000
--- a/codemaker/inc/codemaker/dependencies.hxx
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_CODEMAKER_DEPENDENCIES_HXX
-#define INCLUDED_CODEMAKER_DEPENDENCIES_HXX
-
-#include "sal/config.h"
-
-#include <map>
-
-#include "rtl/ref.hxx"
-#include "rtl/string.hxx"
-#include "rtl/ustring.hxx"
-
-class TypeManager;
-
-/// @HTML
-
-namespace codemaker {
-
-/**
- A simple class to track which other types a given type depends on.
-
- <p>This class is not multi-thread&ndash;safe.</p>
- */
-class Dependencies {
-public:
- /**
- Flags to distinguish whether or not one type depends on another type
- because the second is a direct base of the first.
- */
- enum Kind { KIND_NO_BASE, KIND_BASE };
-
- typedef std::map< OString, Kind > Map;
-
- /**
- Constructs the dependencies for a given type.
-
- <p>If the given type is not successfully available at the given type
- manager, <code>isValid()</code> will return <code>false</code>.</p>
-
- @param manager a type manager, to obtain information about the given type
-
- @param type the UNO type registry name of an enum type, plain struct
- type, polymorphic struct type template, exception type, interface type,
- typedef, module, constant group, service, or singleton
- */
- Dependencies(
- rtl::Reference< TypeManager > const & manager,
- OString const & type);
-
- ~Dependencies();
-
- /**
- Add a special dependency (which is not obvious from the type's data
- available at the type manager).
-
- @param type a UNO type registry name
- */
- void add(OString const & type) { insert(type, false); }
-
- bool isValid() const { return m_valid; }
-
- Map const & getMap() const { return m_map; }
-
- bool hasVoidDependency() const { return m_voidDependency; }
-
- bool hasBooleanDependency() const { return m_booleanDependency; }
-
- bool hasByteDependency() const { return m_byteDependency; }
-
- bool hasShortDependency() const { return m_shortDependency; }
-
- bool hasUnsignedShortDependency() const
- { return m_unsignedShortDependency; }
-
- bool hasLongDependency() const { return m_longDependency; }
-
- bool hasUnsignedLongDependency() const { return m_unsignedLongDependency; }
-
- bool hasHyperDependency() const { return m_hyperDependency; }
-
- bool hasUnsignedHyperDependency() const
- { return m_unsignedHyperDependency; }
-
- bool hasFloatDependency() const { return m_floatDependency; }
-
- bool hasDoubleDependency() const { return m_doubleDependency; }
-
- bool hasCharDependency() const { return m_charDependency; }
-
- bool hasStringDependency() const { return m_stringDependency; }
-
- bool hasTypeDependency() const { return m_typeDependency; }
-
- bool hasAnyDependency() const { return m_anyDependency; }
-
- bool hasSequenceDependency() const { return m_sequenceDependency; }
-
-private:
- Dependencies(Dependencies &); // not implemented
- void operator =(Dependencies); // not implemented
-
- void insert(OUString const & type, bool base);
-
- void insert(OString const & type, bool base);
-
- Map m_map;
- bool m_valid;
- bool m_voidDependency;
- bool m_booleanDependency;
- bool m_byteDependency;
- bool m_shortDependency;
- bool m_unsignedShortDependency;
- bool m_longDependency;
- bool m_unsignedLongDependency;
- bool m_hyperDependency;
- bool m_unsignedHyperDependency;
- bool m_floatDependency;
- bool m_doubleDependency;
- bool m_charDependency;
- bool m_stringDependency;
- bool m_typeDependency;
- bool m_anyDependency;
- bool m_sequenceDependency;
-};
-
-}
-
-#endif // INCLUDED_CODEMAKER_DEPENDENCIES_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/codemaker/inc/codemaker/exceptiontree.hxx b/codemaker/inc/codemaker/exceptiontree.hxx
index 91a0cae3f839..5392386a3c07 100644
--- a/codemaker/inc/codemaker/exceptiontree.hxx
+++ b/codemaker/inc/codemaker/exceptiontree.hxx
@@ -37,7 +37,7 @@ struct ExceptionTreeNode {
typedef std::vector< ExceptionTreeNode * > Children;
// Internally used by ExceptionTree:
- ExceptionTreeNode(OString const & theName):
+ ExceptionTreeNode(rtl::OString const & theName):
name(theName), present(false) {}
// Internally used by ExceptionTree:
@@ -47,9 +47,9 @@ struct ExceptionTreeNode {
void setPresent() { present = true; clearChildren(); }
// Internally used by ExceptionTree:
- ExceptionTreeNode * add(OString const & theName);
+ ExceptionTreeNode * add(rtl::OString const & theName);
- OString name;
+ rtl::OString name;
bool present;
Children children;
@@ -69,15 +69,15 @@ private:
subtypes that are hidden by supertypes are pruned from the hierarchy). The
exception com.sun.star.uno.RuntimeException and its subtypes are pruned
completely from the hierarchy. Each node of the hierarchy is represented by
- an instance of ExceptionTreeNode, where name gives the slashified name of
- the UNO exception type, present is true iff the given exception type is a
- member of the set S, and children contains all the relevant direct subtypes
- of the given exception type, in no particular order (for nodes other than the
- root node it holds that children is non-empty iff present is false).
+ an instance of ExceptionTreeNode, where name gives the name of the UNO
+ exception type, present is true iff the given exception type is a member of
+ the set S, and children contains all the relevant direct subtypes of the
+ given exception type, in no particular order (for nodes other than the root
+ node it holds that children is non-empty iff present is false).
*/
class ExceptionTree {
public:
- ExceptionTree(): m_root("com/sun/star/uno/Exception") {}
+ ExceptionTree(): m_root("com.sun.star.uno.Exception") {}
~ExceptionTree() {}
@@ -86,17 +86,16 @@ public:
This function can be called more than once for the same exception name.
- @param name the name of a UNO exception type, in slashified form; it is
- an error if the given name does not represent a UNO exception type
+ @param name the name of a UNO exception type; it is an error if the given
+ name does not represent a UNO exception type
@param manager a type manager, used to resolve type names; it is an error
if different calls to this member function use different, incompatible
type managers
*/
void add(
- OString const & name,
- rtl::Reference< TypeManager > const & manager)
- throw( CannotDumpException );
+ rtl::OString const & name,
+ rtl::Reference< TypeManager > const & manager);
/**
Gives access to the resultant exception hierarchy.
diff --git a/codemaker/inc/codemaker/global.hxx b/codemaker/inc/codemaker/global.hxx
index 891ed4705e87..2c61ce88ec51 100644
--- a/codemaker/inc/codemaker/global.hxx
+++ b/codemaker/inc/codemaker/global.hxx
@@ -32,7 +32,7 @@
struct EqualString
{
- sal_Bool operator()(const OString& str1, const OString& str2) const
+ sal_Bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const
{
return (str1 == str2);
}
@@ -40,7 +40,7 @@ struct EqualString
struct HashString
{
- size_t operator()(const OString& str) const
+ size_t operator()(const ::rtl::OString& str) const
{
return str.hashCode();
}
@@ -48,15 +48,15 @@ struct HashString
struct LessString
{
- sal_Bool operator()(const OString& str1, const OString& str2) const
+ sal_Bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const
{
return (str1 < str2);
}
};
-typedef ::std::list< OString > StringList;
-typedef ::std::vector< OString > StringVector;
-typedef ::std::set< OString, LessString > StringSet;
+typedef ::std::list< ::rtl::OString > StringList;
+typedef ::std::vector< ::rtl::OString > StringVector;
+typedef ::std::set< ::rtl::OString, LessString > StringSet;
//*************************************************************************
// FileStream
@@ -77,58 +77,58 @@ public:
sal_Bool isValid();
- void createTempFile(const OString& sPath);
+ void createTempFile(const ::rtl::OString& sPath);
void close();
- OString getName() { return m_name; }
+ ::rtl::OString getName() { return m_name; }
bool write(void const * buffer, sal_uInt64 size);
// friend functions
friend FileStream &operator<<(FileStream& o, sal_uInt32 i);
friend FileStream &operator<<(FileStream& o, char const * s);
- friend FileStream &operator<<(FileStream& o, OString* s);
- friend FileStream &operator<<(FileStream& o, const OString& s);
- friend FileStream &operator<<(FileStream& o, OStringBuffer* s);
- friend FileStream &operator<<(FileStream& o, const OStringBuffer& s);
+ friend FileStream &operator<<(FileStream& o, ::rtl::OString* s);
+ friend FileStream &operator<<(FileStream& o, const ::rtl::OString& s);
+ friend FileStream &operator<<(FileStream& o, ::rtl::OStringBuffer* s);
+ friend FileStream &operator<<(FileStream& o, const ::rtl::OStringBuffer& s);
+ friend FileStream & operator <<(FileStream & out, rtl::OUString const & s);
private:
oslFileHandle m_file;
- OString m_name;
+ ::rtl::OString m_name;
};
//*************************************************************************
// Helper functions
//*************************************************************************
-OString getTempDir(const OString& sFileName);
+::rtl::OString getTempDir(const ::rtl::OString& sFileName);
-OString createFileNameFromType(const OString& destination,
- const OString type,
- const OString postfix,
+::rtl::OString createFileNameFromType(const ::rtl::OString& destination,
+ const ::rtl::OString type,
+ const ::rtl::OString postfix,
sal_Bool bLowerCase=sal_False,
- const OString prefix="");
+ const ::rtl::OString prefix="");
-sal_Bool fileExists(const OString& fileName);
-sal_Bool makeValidTypeFile(const OString& targetFileName,
- const OString& tmpFileName,
+sal_Bool fileExists(const ::rtl::OString& fileName);
+sal_Bool makeValidTypeFile(const ::rtl::OString& targetFileName,
+ const ::rtl::OString& tmpFileName,
sal_Bool bFileCheck);
-sal_Bool removeTypeFile(const OString& fileName);
+sal_Bool removeTypeFile(const ::rtl::OString& fileName);
-OUString convertToFileUrl(const OString& fileName);
+::rtl::OUString convertToFileUrl(const ::rtl::OString& fileName);
-//*************************************************************************
-// Global exception to signal problems when a type cannot be dumped
-//*************************************************************************
-class CannotDumpException
-{
+class CannotDumpException {
public:
- CannotDumpException(const OString& msg)
- : m_message(msg) {}
+ CannotDumpException(OUString const & message): message_(message) {}
- OString m_message;
-};
+ virtual ~CannotDumpException() throw ();
+ OUString getMessage() const { return message_; }
+
+private:
+ OUString message_;
+};
#endif // INCLUDED_CODEMAKER_GLOBAL_HXX
diff --git a/codemaker/inc/codemaker/options.hxx b/codemaker/inc/codemaker/options.hxx
index 053cda9cf44b..4a33e280ca69 100644
--- a/codemaker/inc/codemaker/options.hxx
+++ b/codemaker/inc/codemaker/options.hxx
@@ -26,8 +26,8 @@
typedef ::boost::unordered_map
<
- OString,
- OString,
+ ::rtl::OString,
+ ::rtl::OString,
HashString,
EqualString
> OptionMap;
@@ -35,10 +35,10 @@ typedef ::boost::unordered_map
class IllegalArgument
{
public:
- IllegalArgument(const OString& msg)
+ IllegalArgument(const ::rtl::OString& msg)
: m_message(msg) {}
- OString m_message;
+ ::rtl::OString m_message;
};
class Options
@@ -50,11 +50,11 @@ public:
virtual sal_Bool initOptions(int ac, char* av[], sal_Bool bCmdFile=sal_False)
throw( IllegalArgument ) = 0;
- virtual OString prepareHelp() = 0;
+ virtual ::rtl::OString prepareHelp() = 0;
- const OString& getProgramName() const;
- sal_Bool isValid(const OString& option);
- const OString getOption(const OString& option)
+ const ::rtl::OString& getProgramName() const;
+ sal_Bool isValid(const ::rtl::OString& option) const;
+ const ::rtl::OString getOption(const ::rtl::OString& option) const
throw( IllegalArgument );
const StringVector& getInputFiles();
@@ -64,7 +64,7 @@ public:
inline const StringVector& getExtraInputFiles() const
{ return m_extra_input_files; }
protected:
- OString m_program;
+ ::rtl::OString m_program;
StringVector m_inputFiles;
StringVector m_extra_input_files;
OptionMap m_options;
diff --git a/codemaker/inc/codemaker/typemanager.hxx b/codemaker/inc/codemaker/typemanager.hxx
index 886aee54648c..325a51011756 100644
--- a/codemaker/inc/codemaker/typemanager.hxx
+++ b/codemaker/inc/codemaker/typemanager.hxx
@@ -21,14 +21,23 @@
#define INCLUDED_CODEMAKER_TYPEMANAGER_HXX
#include "codemaker/global.hxx"
+#include "codemaker/unotype.hxx"
#include "registry/registry.hxx"
#include "registry/types.h"
+#include "rtl/ref.hxx"
#include "salhelper/simplereferenceobject.hxx"
#include <boost/unordered_map.hpp>
#include <list>
+#include <vector>
namespace typereg { class Reader; }
+namespace unoidl {
+ class Entity;
+ class Manager;
+ class MapCursor;
+ class Provider;
+}
//typedef ::std::list< Registry* > RegistryList;
typedef ::std::vector< Registry* > RegistryList;
@@ -37,7 +46,7 @@ typedef ::std::vector< KeyPair > RegistryKeyList;
typedef ::boost::unordered_map
<
- OString, // Typename
+ ::rtl::OString, // Typename
RTTypeClass, // TypeClass
HashString,
EqualString
@@ -50,40 +59,60 @@ public:
sal_Bool init(const StringVector& regFiles, const StringVector& extraFiles = StringVector() );
- OString getTypeName(RegistryKey& rTypeKey) const;
+ ::rtl::OString getTypeName(RegistryKey& rTypeKey) const;
- sal_Bool isValidType(const OString& name) const
+ sal_Bool isValidType(const ::rtl::OString& name) const
{ return searchTypeKey(name, 0).isValid(); }
RegistryKey getTypeKey(
- const OString& name, sal_Bool * pIsExtraType = 0 ) const
+ const ::rtl::OString& name, sal_Bool * pIsExtraType = 0 ) const
{ return searchTypeKey(name, pIsExtraType); }
- RegistryKeyList getTypeKeys(const OString& name) const;
+ RegistryKeyList getTypeKeys(const ::rtl::OString& name) const;
typereg::Reader getTypeReader(
- const OString& name, sal_Bool * pIsExtraType = 0 ) const;
+ const ::rtl::OString& name, sal_Bool * pIsExtraType = 0 ) const;
typereg::Reader getTypeReader(RegistryKey& rTypeKey) const;
- RTTypeClass getTypeClass(const OString& name) const;
+ RTTypeClass getTypeClass(const ::rtl::OString& name) const;
RTTypeClass getTypeClass(RegistryKey& rTypeKey) const;
- void setBase(const OString& base);
- OString getBase() const { return m_base; }
+ void setBase(const ::rtl::OString& base);
+ ::rtl::OString getBase() const { return m_base; }
sal_Int32 getSize() const { return m_t2TypeClass.size(); }
- static sal_Bool isBaseType(const OString& name);
+
+ void loadProvider(rtl::OUString const & uri, bool primary);
+
+ bool foundAtPrimaryProvider(rtl::OUString const & name) const;
+
+ codemaker::UnoType::Sort getSort(
+ rtl::OUString const & name,
+ rtl::Reference< unoidl::Entity > * entity = 0,
+ rtl::Reference< unoidl::MapCursor > * cursor = 0) const;
private:
virtual ~TypeManager();
RegistryKey searchTypeKey(
- const OString& name, sal_Bool * pIsExtraType = 0 ) const;
+ const ::rtl::OString& name, sal_Bool * pIsExtraType = 0 ) const;
void freeRegistries();
mutable T2TypeClassMap m_t2TypeClass;
RegistryList m_registries;
RegistryList m_extra_registries;
- OString m_base;
+ ::rtl::OString m_base;
+
+ rtl::Reference< unoidl::Manager > manager_;
+ std::vector< rtl::Reference< unoidl::Provider > > primaryProviders_;
};
+
+inline rtl::OString u2b(rtl::OUString const & s) {
+ return rtl::OUStringToOString(s, RTL_TEXTENCODING_UTF8);
+}
+
+inline rtl::OUString b2u(rtl::OString const & s) {
+ return rtl::OStringToOUString(s, RTL_TEXTENCODING_UTF8);
+}
+
#endif // INCLUDED_CODEMAKER_TYPEMANAGER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/codemaker/inc/codemaker/unotype.hxx b/codemaker/inc/codemaker/unotype.hxx
index ce22e62959dd..6d6038e02a87 100644
--- a/codemaker/inc/codemaker/unotype.hxx
+++ b/codemaker/inc/codemaker/unotype.hxx
@@ -21,17 +21,16 @@
#define INCLUDED_CODEMAKER_UNOTYPE_HXX
#include "sal/types.h"
-#include <rtl/ustring.hxx>
#include <vector>
+namespace rtl { class OString; }
+
namespace codemaker {
namespace UnoType {
/**
- An enumeration of all the sorts of UNO types.
-
- All complex UNO types are subsumed under SORT_COMPLEX.
+ An enumeration of all the sorts of relevant UNOIDL entities.
*/
enum Sort {
SORT_VOID,
@@ -49,10 +48,26 @@ namespace UnoType {
SORT_STRING,
SORT_TYPE,
SORT_ANY,
- SORT_COMPLEX
+
+ SORT_SEQUENCE_TYPE,
+ SORT_MODULE,
+ SORT_ENUM_TYPE,
+ SORT_PLAIN_STRUCT_TYPE,
+ SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE,
+ SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE,
+ SORT_EXCEPTION_TYPE,
+ SORT_INTERFACE_TYPE,
+ SORT_TYPEDEF,
+ SORT_CONSTANT_GROUP,
+ SORT_SINGLE_INTERFACE_BASED_SERVICE,
+ SORT_ACCUMULATION_BASED_SERVICE,
+ SORT_INTERFACE_BASED_SINGLETON,
+ SORT_SERVICE_BASED_SINGLETON
+
+ ,SORT_COMPLEX=SORT_SEQUENCE_TYPE //TODO
};
- /**
+ /** TODO
Maps from a binary UNO type name or UNO type registry name to its type
sort.
@@ -63,20 +78,9 @@ namespace UnoType {
is a UNO type registry name that denotes something other than a UNO type,
SORT_COMPLEX is returned)
*/
- Sort getSort(OString const & type);
-
- /**
- Determines whether a UNO type name or UNO type registry name denotes a
- UNO sequence type.
+ Sort getSort(rtl::OString const & type);
- @param type a binary UNO type name or UNO type registry name
-
- @return true iff the given type denotes a UNO sequence type; the
- detection is purely syntactical
- */
- bool isSequenceType(OString const & type);
-
- /**
+ /** TODO
Decomposes a UNO type name or UNO type registry name.
@param type a binary UNO type name or UNO type registry name
@@ -91,9 +95,9 @@ namespace UnoType {
@return the base part of the given type
*/
- OString decompose(
- OString const & type, sal_Int32 * rank = 0,
- std::vector< OString > * arguments = 0);
+ rtl::OString decompose(
+ rtl::OString const & type, sal_Int32 * rank = 0,
+ std::vector< rtl::OString > * arguments = 0);
}
}