diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-04-18 18:26:28 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-04-23 22:20:31 +0200 |
commit | b9337e22ce1dbf2eba0e8c8db294ae99f4111f91 (patch) | |
tree | 53ee1bd3dfd213815a21579151983cb997922b05 /include/codemaker | |
parent | move global headers script (diff) | |
download | core-b9337e22ce1dbf2eba0e8c8db294ae99f4111f91.tar.gz core-b9337e22ce1dbf2eba0e8c8db294ae99f4111f91.zip |
execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details
Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
Diffstat (limited to 'include/codemaker')
-rw-r--r-- | include/codemaker/codemaker.hxx | 38 | ||||
-rw-r--r-- | include/codemaker/commoncpp.hxx | 63 | ||||
-rw-r--r-- | include/codemaker/commonjava.hxx | 42 | ||||
-rw-r--r-- | include/codemaker/exceptiontree.hxx | 120 | ||||
-rw-r--r-- | include/codemaker/generatedtypeset.hxx | 73 | ||||
-rw-r--r-- | include/codemaker/global.hxx | 135 | ||||
-rw-r--r-- | include/codemaker/options.hxx | 75 | ||||
-rw-r--r-- | include/codemaker/typemanager.hxx | 76 | ||||
-rw-r--r-- | include/codemaker/unotype.hxx | 91 |
9 files changed, 713 insertions, 0 deletions
diff --git a/include/codemaker/codemaker.hxx b/include/codemaker/codemaker.hxx new file mode 100644 index 000000000000..49d1d4b9cea8 --- /dev/null +++ b/include/codemaker/codemaker.hxx @@ -0,0 +1,38 @@ +/* -*- 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_CODEMAKER_HXX +#define INCLUDED_CODEMAKER_CODEMAKER_HXX + +#include "sal/config.h" + +namespace rtl { + class OString; + class OUString; +} + +namespace codemaker { + +rtl::OString convertString(rtl::OUString const & string); + +} + +#endif // INCLUDED_CODEMAKER_CODEMAKER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/codemaker/commoncpp.hxx b/include/codemaker/commoncpp.hxx new file mode 100644 index 000000000000..8bff48fc0809 --- /dev/null +++ b/include/codemaker/commoncpp.hxx @@ -0,0 +1,63 @@ +/* -*- 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_COMMONCPP_HXX +#define INCLUDED_CODEMAKER_COMMONCPP_HXX + +#include "sal/config.h" + +#include "codemaker/unotype.hxx" + +namespace rtl { + class OString; + class OUString; +} + +namespace codemaker { namespace cpp { + +/** Stick a namespace scope to c++ type + + @param type + Undecorated type + + @param ns_alias + Use common namespace aliases instead of fully specified (nested) + namespace. currently replaces com::sun::star with css. + */ +rtl::OString scopedCppName(rtl::OString const & type, bool ns_alias=true); + +rtl::OString translateUnoToCppType( + codemaker::UnoType::Sort sort, rtl::OUString const & nucleus); + +enum IdentifierTranslationMode { + ITM_GLOBAL, + ITM_NONGLOBAL, + ITM_KEYWORDSONLY +}; + +rtl::OString translateUnoToCppIdentifier( + rtl::OString const & identifier, rtl::OString const & prefix, + IdentifierTranslationMode transmode = ITM_GLOBAL, + rtl::OString const * forbidden = 0); + +} } + +#endif // INCLUDED_CODEMAKER_COMMONCPP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/codemaker/commonjava.hxx b/include/codemaker/commonjava.hxx new file mode 100644 index 000000000000..54d9403cda57 --- /dev/null +++ b/include/codemaker/commonjava.hxx @@ -0,0 +1,42 @@ +/* -*- 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_COMMONJAVA_HXX +#define INCLUDED_CODEMAKER_COMMONJAVA_HXX + +#include "sal/config.h" + +#include "codemaker/unotype.hxx" + +namespace rtl { class OString; } + +namespace codemaker { namespace java { + +rtl::OString translateUnoToJavaType( + codemaker::UnoType::Sort sort, rtl::OString const & nucleus, + bool referenceType); + +rtl::OString translateUnoToJavaIdentifier( + rtl::OString const & identifier, rtl::OString const & prefix); + +} } + +#endif // INCLUDED_CODEMAKER_COMMONJAVA_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/codemaker/exceptiontree.hxx b/include/codemaker/exceptiontree.hxx new file mode 100644 index 000000000000..5392386a3c07 --- /dev/null +++ b/include/codemaker/exceptiontree.hxx @@ -0,0 +1,120 @@ +/* -*- 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_EXCEPTIONTREE_HXX +#define INCLUDED_CODEMAKER_EXCEPTIONTREE_HXX + +#include "codemaker/global.hxx" +#include "rtl/ref.hxx" +#include "rtl/string.hxx" + +#include <vector> + +class TypeManager; + +namespace codemaker { + +/** + Represents a node of the hierarchy from the ExceptionTree class. + */ +struct ExceptionTreeNode { + typedef std::vector< ExceptionTreeNode * > Children; + + // Internally used by ExceptionTree: + ExceptionTreeNode(rtl::OString const & theName): + name(theName), present(false) {} + + // Internally used by ExceptionTree: + ~ExceptionTreeNode() { clearChildren(); } + + // Internally used by ExceptionTree: + void setPresent() { present = true; clearChildren(); } + + // Internally used by ExceptionTree: + ExceptionTreeNode * add(rtl::OString const & theName); + + rtl::OString name; + bool present; + Children children; + +private: + ExceptionTreeNode(ExceptionTreeNode &); // not implemented + void operator =(ExceptionTreeNode); // not implemented + + void clearChildren(); +}; + +/** + Represents the hierarchy formed by a set of UNO exception types. + + The hierarchy is rooted at com.sun.star.uno.Exception. For each exception E + from the given set S, the hierarchy from com.sun.star.uno.Exception to the + first supertype E' of E which is itself a member of S is represented (i.e., + 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 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() {} + + /** + Builds the exception hierarchy, by adding one exception type at a time. + + This function can be called more than once for the same exception name. + + @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( + rtl::OString const & name, + rtl::Reference< TypeManager > const & manager); + + /** + Gives access to the resultant exception hierarchy. + + @return a non-null pointer to the root of the exception hierarchy, as + formed by all previous calls to add; it is an error if any calls to add + follow the first call to getRoot + */ + ExceptionTreeNode const * getRoot() const { return &m_root; } + +private: + ExceptionTree(ExceptionTree &); // not implemented + void operator =(ExceptionTree); // not implemented + + ExceptionTreeNode m_root; +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/codemaker/generatedtypeset.hxx b/include/codemaker/generatedtypeset.hxx new file mode 100644 index 000000000000..3d1a5615b0b1 --- /dev/null +++ b/include/codemaker/generatedtypeset.hxx @@ -0,0 +1,73 @@ +/* -*- 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_GENERATEDTYPESET_HXX +#define INCLUDED_CODEMAKER_GENERATEDTYPESET_HXX + +#include "rtl/string.hxx" + +#include <boost/unordered_set.hpp> + +/// @HTML + +namespace codemaker { + +/** + A simple class to track which types have already been processed by a code + maker. + + <p>This class is not multi-thread–safe.</p> + */ +class GeneratedTypeSet { +public: + GeneratedTypeSet() {} + + ~GeneratedTypeSet() {} + + /** + Add a type to the set of generated types. + + <p>If the type was already present, nothing happens.</p> + + @param type a UNO type registry name + */ + void add(OString const & type) { m_set.insert(type); } + + /** + Checks whether a given type has already been generated. + + @param type a UNO type registry name + + @return true iff the given type has already been generated + */ + bool contains(OString const & type) const + { return m_set.find(type) != m_set.end(); } + +private: + GeneratedTypeSet(GeneratedTypeSet &); // not implemented + void operator =(GeneratedTypeSet); // not implemented + + boost::unordered_set< OString, OStringHash > m_set; +}; + +} + +#endif // INCLUDED_CODEMAKER_GENERATEDTYPESET_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/codemaker/global.hxx b/include/codemaker/global.hxx new file mode 100644 index 000000000000..2c61ce88ec51 --- /dev/null +++ b/include/codemaker/global.hxx @@ -0,0 +1,135 @@ +/* -*- 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_GLOBAL_HXX +#define INCLUDED_CODEMAKER_GLOBAL_HXX + +#include <list> +#include <vector> +#include <set> + +#include <stdio.h> + +#include "osl/file.hxx" +#include "rtl/ustring.hxx" +#include "rtl/strbuf.hxx" + +struct EqualString +{ + sal_Bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const + { + return (str1 == str2); + } +}; + +struct HashString +{ + size_t operator()(const ::rtl::OString& str) const + { + return str.hashCode(); + } +}; + +struct LessString +{ + sal_Bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const + { + return (str1 < str2); + } +}; + +typedef ::std::list< ::rtl::OString > StringList; +typedef ::std::vector< ::rtl::OString > StringVector; +typedef ::std::set< ::rtl::OString, LessString > StringSet; + +//************************************************************************* +// FileStream +//************************************************************************* +enum FileAccessMode +{ + FAM_READ, // "r" + FAM_WRITE, // "w" + FAM_READWRITE_EXIST, // "r+" + FAM_READWRITE // "w+" +}; + +class FileStream +{ +public: + FileStream(); + virtual ~FileStream(); + + sal_Bool isValid(); + + void createTempFile(const ::rtl::OString& sPath); + void close(); + + ::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, ::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; + ::rtl::OString m_name; +}; + + +//************************************************************************* +// Helper functions +//************************************************************************* +::rtl::OString getTempDir(const ::rtl::OString& sFileName); + +::rtl::OString createFileNameFromType(const ::rtl::OString& destination, + const ::rtl::OString type, + const ::rtl::OString postfix, + sal_Bool bLowerCase=sal_False, + const ::rtl::OString prefix=""); + +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 ::rtl::OString& fileName); + +::rtl::OUString convertToFileUrl(const ::rtl::OString& fileName); + +class CannotDumpException { +public: + CannotDumpException(OUString const & message): message_(message) {} + + virtual ~CannotDumpException() throw (); + + OUString getMessage() const { return message_; } + +private: + OUString message_; +}; + +#endif // INCLUDED_CODEMAKER_GLOBAL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/codemaker/options.hxx b/include/codemaker/options.hxx new file mode 100644 index 000000000000..4a33e280ca69 --- /dev/null +++ b/include/codemaker/options.hxx @@ -0,0 +1,75 @@ +/* -*- 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_OPTIONS_HXX +#define INCLUDED_CODEMAKER_OPTIONS_HXX + +#include <boost/unordered_map.hpp> + +#include <codemaker/global.hxx> + +typedef ::boost::unordered_map +< + ::rtl::OString, + ::rtl::OString, + HashString, + EqualString +> OptionMap; + +class IllegalArgument +{ +public: + IllegalArgument(const ::rtl::OString& msg) + : m_message(msg) {} + + ::rtl::OString m_message; +}; + +class Options +{ +public: + Options(); + virtual ~Options(); + + virtual sal_Bool initOptions(int ac, char* av[], sal_Bool bCmdFile=sal_False) + throw( IllegalArgument ) = 0; + + virtual ::rtl::OString prepareHelp() = 0; + + 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(); + + inline sal_uInt16 getNumberOfExtraInputFiles() const + { return (sal_uInt16)m_extra_input_files.size(); } + inline const StringVector& getExtraInputFiles() const + { return m_extra_input_files; } +protected: + ::rtl::OString m_program; + StringVector m_inputFiles; + StringVector m_extra_input_files; + OptionMap m_options; +}; + +#endif // INCLUDED_CODEMAKER_OPTIONS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/codemaker/typemanager.hxx b/include/codemaker/typemanager.hxx new file mode 100644 index 000000000000..fc6aba69ab1d --- /dev/null +++ b/include/codemaker/typemanager.hxx @@ -0,0 +1,76 @@ +/* -*- 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_TYPEMANAGER_HXX +#define INCLUDED_CODEMAKER_TYPEMANAGER_HXX + +#include "sal/config.h" + +#include <vector> + +#include "codemaker/unotype.hxx" +#include "rtl/ref.hxx" +#include "rtl/string.hxx" +#include "rtl/textenc.h" +#include "rtl/ustring.hxx" +#include "salhelper/simplereferenceobject.hxx" + +namespace unoidl { + class Entity; + class Manager; + class MapCursor; + class Provider; +} + +class TypeManager: public salhelper::SimpleReferenceObject { +public: + TypeManager(); + + void loadProvider(OUString const & uri, bool primary); + + bool foundAtPrimaryProvider(OUString const & name) const; + + codemaker::UnoType::Sort getSort( + OUString const & name, rtl::Reference< unoidl::Entity > * entity = 0, + rtl::Reference< unoidl::MapCursor > * cursor = 0) const; + + codemaker::UnoType::Sort decompose( + OUString const & name, bool resolveTypedefs, OUString * nucleus, + sal_Int32 * rank, std::vector< OUString > * arguments, + rtl::Reference< unoidl::Entity > * entity) const; + +private: + virtual ~TypeManager(); + + rtl::Reference< unoidl::Manager > manager_; + std::vector< rtl::Reference< unoidl::Provider > > primaryProviders_; +}; + + +inline OString u2b(OUString const & s) { + return OUStringToOString(s, RTL_TEXTENCODING_UTF8); +} + +inline OUString b2u(OString const & s) { + return OStringToOUString(s, RTL_TEXTENCODING_UTF8); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/codemaker/unotype.hxx b/include/codemaker/unotype.hxx new file mode 100644 index 000000000000..b00de6658a99 --- /dev/null +++ b/include/codemaker/unotype.hxx @@ -0,0 +1,91 @@ +/* -*- 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_UNOTYPE_HXX +#define INCLUDED_CODEMAKER_UNOTYPE_HXX + +#include "sal/types.h" + +#include <vector> + +namespace rtl { class OString; } + +namespace codemaker { + +namespace UnoType { + /** + An enumeration of all the sorts of relevant UNOIDL entities. + */ + enum Sort { + SORT_VOID, + SORT_BOOLEAN, + SORT_BYTE, + SORT_SHORT, + SORT_UNSIGNED_SHORT, + SORT_LONG, + SORT_UNSIGNED_LONG, + SORT_HYPER, + SORT_UNSIGNED_HYPER, + SORT_FLOAT, + SORT_DOUBLE, + SORT_CHAR, + SORT_STRING, + SORT_TYPE, + SORT_ANY, + 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 + }; + + /** + Decomposes a UNO type name or UNO type registry name. + + @param type a binary UNO type name or UNO type registry name + + @param rank if non-null, returns the rank of the denoted UNO type (which + is zero for any given type that does not denote a UNO sequence type) + + @param arguments if non-null, the type arguments are stripped from an + instantiated polymorphic struct type and returned via this parameter (in + the correct order); if null, type arguments are not stripped from + instantiated polymorphic struct types + + @return the base part of the given type + */ + rtl::OString decompose( + rtl::OString const & type, sal_Int32 * rank = 0, + std::vector< rtl::OString > * arguments = 0); +} + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |