summaryrefslogtreecommitdiff
path: root/codemaker/source/cppumaker/dumputils.cxx
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/source/cppumaker/dumputils.cxx
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/source/cppumaker/dumputils.cxx')
-rw-r--r--codemaker/source/cppumaker/dumputils.cxx54
1 files changed, 25 insertions, 29 deletions
diff --git a/codemaker/source/cppumaker/dumputils.cxx b/codemaker/source/cppumaker/dumputils.cxx
index bc1781314789..4c8282443dba 100644
--- a/codemaker/source/cppumaker/dumputils.cxx
+++ b/codemaker/source/cppumaker/dumputils.cxx
@@ -30,52 +30,48 @@
namespace codemaker { namespace cppumaker {
bool dumpNamespaceOpen(
- FileStream & out, OString const & registryType, bool fullModuleType)
+ FileStream & out, rtl::OUString const & entityName, bool fullModuleType)
{
bool output = false;
- if (registryType != "/") {
- bool first = true;
- for (sal_Int32 i = 0; i >= 0;) {
- OString id(registryType.getToken(0, '/', i));
- if (fullModuleType || i >= 0) {
- if (!first) {
- out << " ";
- }
- out << "namespace " << id << " {";
- first = false;
- output = true;
+ bool first = true;
+ for (sal_Int32 i = 0; i >= 0;) {
+ rtl::OUString id(entityName.getToken(0, '.', i));
+ if (fullModuleType || i >= 0) {
+ if (!first) {
+ out << " ";
}
+ out << "namespace " << id << " {";
+ first = false;
+ output = true;
}
}
return output;
}
bool dumpNamespaceClose(
- FileStream & out, OString const & registryType, bool fullModuleType)
+ FileStream & out, rtl::OUString const & entityName, bool fullModuleType)
{
bool output = false;
- if (registryType != "/") {
- bool first = true;
- for (sal_Int32 i = 0; i >= 0;) {
- i = registryType.indexOf('/', i);
- if (i >= 0) {
- ++i;
- }
- if (fullModuleType || i >= 0) {
- if (!first) {
- out << " ";
- }
- out << "}";
- first = false;
- output = true;
+ bool first = true;
+ for (sal_Int32 i = 0; i >= 0;) {
+ i = entityName.indexOf('.', i);
+ if (i >= 0) {
+ ++i;
+ }
+ if (fullModuleType || i >= 0) {
+ if (!first) {
+ out << " ";
}
+ out << "}";
+ first = false;
+ output = true;
}
}
return output;
}
-void dumpTypeIdentifier(FileStream & out, OString const & registryType) {
- out << registryType.copy(registryType.lastIndexOf('/') + 1);
+void dumpTypeIdentifier(FileStream & out, rtl::OUString const & entityName) {
+ out << entityName.copy(entityName.lastIndexOf('.') + 1);
}
} }