summaryrefslogtreecommitdiff
path: root/codemaker/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-16 17:37:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-16 17:38:44 +0200
commit048e59181955f13d9b9add933f8d19a7778d4932 (patch)
tree34786aaee34e9abfd13e9edde6586f71b5444712 /codemaker/inc
parent4b9301d424baab1552222d9be56726c64aefb720 (diff)
Further codemaker, unodevtools clean-up
...getting rid of now dangling references to module registry. Change-Id: Iccad7ff5dc0e79bf91b7b7dae03b73f16adeb121
Diffstat (limited to 'codemaker/inc')
-rw-r--r--codemaker/inc/codemaker/codemaker.hxx7
-rw-r--r--codemaker/inc/codemaker/commoncpp.hxx9
-rw-r--r--codemaker/inc/codemaker/commonjava.hxx6
-rw-r--r--codemaker/inc/codemaker/typemanager.hxx72
-rw-r--r--codemaker/inc/codemaker/unotype.hxx18
5 files changed, 27 insertions, 85 deletions
diff --git a/codemaker/inc/codemaker/codemaker.hxx b/codemaker/inc/codemaker/codemaker.hxx
index c952c368b354..49d1d4b9cea8 100644
--- a/codemaker/inc/codemaker/codemaker.hxx
+++ b/codemaker/inc/codemaker/codemaker.hxx
@@ -21,18 +21,11 @@
#define INCLUDED_CODEMAKER_CODEMAKER_HXX
#include "sal/config.h"
-#include "codemaker/unotype.hxx"
-#include "registry/types.h"
-#include "rtl/ref.hxx"
-#include "sal/types.h"
-
-#include <vector>
namespace rtl {
class OString;
class OUString;
}
-class TypeManager;
namespace codemaker {
diff --git a/codemaker/inc/codemaker/commoncpp.hxx b/codemaker/inc/codemaker/commoncpp.hxx
index 9eafb91b4ee0..8bff48fc0809 100644
--- a/codemaker/inc/codemaker/commoncpp.hxx
+++ b/codemaker/inc/codemaker/commoncpp.hxx
@@ -20,7 +20,14 @@
#ifndef INCLUDED_CODEMAKER_COMMONCPP_HXX
#define INCLUDED_CODEMAKER_COMMONCPP_HXX
-#include "codemaker/codemaker.hxx"
+#include "sal/config.h"
+
+#include "codemaker/unotype.hxx"
+
+namespace rtl {
+ class OString;
+ class OUString;
+}
namespace codemaker { namespace cpp {
diff --git a/codemaker/inc/codemaker/commonjava.hxx b/codemaker/inc/codemaker/commonjava.hxx
index 8ff0a9a02d17..54d9403cda57 100644
--- a/codemaker/inc/codemaker/commonjava.hxx
+++ b/codemaker/inc/codemaker/commonjava.hxx
@@ -20,7 +20,11 @@
#ifndef INCLUDED_CODEMAKER_COMMONJAVA_HXX
#define INCLUDED_CODEMAKER_COMMONJAVA_HXX
-#include "codemaker/codemaker.hxx"
+#include "sal/config.h"
+
+#include "codemaker/unotype.hxx"
+
+namespace rtl { class OString; }
namespace codemaker { namespace java {
diff --git a/codemaker/inc/codemaker/typemanager.hxx b/codemaker/inc/codemaker/typemanager.hxx
index 48e59897a2e7..fc6aba69ab1d 100644
--- a/codemaker/inc/codemaker/typemanager.hxx
+++ b/codemaker/inc/codemaker/typemanager.hxx
@@ -20,18 +20,17 @@
#ifndef INCLUDED_CODEMAKER_TYPEMANAGER_HXX
#define INCLUDED_CODEMAKER_TYPEMANAGER_HXX
-#include "codemaker/global.hxx"
+#include "sal/config.h"
+
+#include <vector>
+
#include "codemaker/unotype.hxx"
-#include "registry/registry.hxx"
-#include "registry/types.h"
#include "rtl/ref.hxx"
+#include "rtl/string.hxx"
+#include "rtl/textenc.h"
+#include "rtl/ustring.hxx"
#include "salhelper/simplereferenceobject.hxx"
-#include <boost/unordered_map.hpp>
-#include <list>
-#include <vector>
-
-namespace typereg { class Reader; }
namespace unoidl {
class Entity;
class Manager;
@@ -39,46 +38,10 @@ namespace unoidl {
class Provider;
}
-//typedef ::std::list< Registry* > RegistryList;
-typedef ::std::vector< Registry* > RegistryList;
-typedef ::std::pair< RegistryKey, sal_Bool > KeyPair;
-typedef ::std::vector< KeyPair > RegistryKeyList;
-
-typedef ::boost::unordered_map
-<
- ::rtl::OString, // Typename
- RTTypeClass, // TypeClass
- HashString,
- EqualString
-> T2TypeClassMap;
-
-class TypeManager : public salhelper::SimpleReferenceObject
-{
+class TypeManager: public salhelper::SimpleReferenceObject {
public:
TypeManager();
- sal_Bool init(const StringVector& regFiles, const StringVector& extraFiles = StringVector() );
-
- ::rtl::OString getTypeName(RegistryKey& rTypeKey) const;
-
- sal_Bool isValidType(const ::rtl::OString& name) const
- { return searchTypeKey(name, 0).isValid(); }
- RegistryKey getTypeKey(
- const ::rtl::OString& name, sal_Bool * pIsExtraType = 0 ) const
- { return searchTypeKey(name, pIsExtraType); }
- RegistryKeyList getTypeKeys(const ::rtl::OString& name) const;
- typereg::Reader getTypeReader(
- const ::rtl::OString& name, sal_Bool * pIsExtraType = 0 ) const;
- typereg::Reader getTypeReader(RegistryKey& rTypeKey) const;
- RTTypeClass getTypeClass(const ::rtl::OString& name) const;
- RTTypeClass getTypeClass(RegistryKey& rTypeKey) const;
-
- void setBase(const ::rtl::OString& base);
- ::rtl::OString getBase() const { return m_base; }
-
- sal_Int32 getSize() const { return m_t2TypeClass.size(); }
-
-
void loadProvider(OUString const & uri, bool primary);
bool foundAtPrimaryProvider(OUString const & name) const;
@@ -95,28 +58,19 @@ public:
private:
virtual ~TypeManager();
- RegistryKey searchTypeKey(
- const ::rtl::OString& name, sal_Bool * pIsExtraType = 0 ) const;
- void freeRegistries();
-
- mutable T2TypeClassMap m_t2TypeClass;
- RegistryList m_registries;
- RegistryList m_extra_registries;
- ::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 OString u2b(OUString const & s) {
+ return OUStringToOString(s, RTL_TEXTENCODING_UTF8);
}
-inline rtl::OUString b2u(rtl::OString const & s) {
- return rtl::OStringToOUString(s, RTL_TEXTENCODING_UTF8);
+inline OUString b2u(OString const & s) {
+ return OStringToOUString(s, RTL_TEXTENCODING_UTF8);
}
-#endif // INCLUDED_CODEMAKER_TYPEMANAGER_HXX
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/codemaker/inc/codemaker/unotype.hxx b/codemaker/inc/codemaker/unotype.hxx
index 6d6038e02a87..b00de6658a99 100644
--- a/codemaker/inc/codemaker/unotype.hxx
+++ b/codemaker/inc/codemaker/unotype.hxx
@@ -48,7 +48,6 @@ namespace UnoType {
SORT_STRING,
SORT_TYPE,
SORT_ANY,
-
SORT_SEQUENCE_TYPE,
SORT_MODULE,
SORT_ENUM_TYPE,
@@ -63,24 +62,9 @@ namespace UnoType {
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.
-
- @param type a binary UNO type name or UNO type registry name
-
- @return the sort of the UNO type denoted by the given type; the detection
- of the correct sort is purely syntactical (especially, if the given input
- is a UNO type registry name that denotes something other than a UNO type,
- SORT_COMPLEX is returned)
- */
- Sort getSort(rtl::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