summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp126
1 files changed, 63 insertions, 63 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 435531772d1..14a8f60f8fd 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -592,56 +592,40 @@ Slice::Gen::generate(const UnitPtr& p)
H << sp;
H.zeroIndent();
- H << nl << "#ifndef ICE_CPP11_MAPPING // C++98 mapping";
+ H << nl << "#ifdef ICE_CPP11_MAPPING // C++11 mapping";
H.restoreIndent();
C << sp;
C.zeroIndent();
- C << nl << "#ifndef ICE_CPP11_MAPPING // C++98 mapping";
+ C << nl << "#ifdef ICE_CPP11_MAPPING // C++11 mapping";
C.restoreIndent();
{
- ProxyDeclVisitor proxyDeclVisitor(H, C, _dllExport);
+ Cpp11ProxyDeclVisitor proxyDeclVisitor(H, C, _dllExport);
p->visit(&proxyDeclVisitor, false);
- ObjectDeclVisitor objectDeclVisitor(H, C, _dllExport);
+ Cpp11ObjectDeclVisitor objectDeclVisitor(H, C, _dllExport);
p->visit(&objectDeclVisitor, false);
- TypesVisitor typesVisitor(H, C, _dllExport, _stream);
+ Cpp11TypesVisitor typesVisitor(H, C, _dllExport);
p->visit(&typesVisitor, false);
- StreamVisitor streamVisitor(H, C, _dllExport);
+ Cpp11StreamVisitor streamVisitor(H, C, _dllExport);
p->visit(&streamVisitor, false);
- AsyncVisitor asyncVisitor(H, C, _dllExport);
- p->visit(&asyncVisitor, false);
-
- AsyncImplVisitor asyncImplVisitor(H, C, _dllExport);
- p->visit(&asyncImplVisitor, false);
-
- //
- // The templates are emitted before the proxy definition
- // so the derivation hierarchy is known to the proxy:
- // the proxy relies on knowing the hierarchy to make the begin_
- // methods type-safe.
- //
- AsyncCallbackVisitor asyncCallbackVisitor(H, C, _dllExport);
- p->visit(&asyncCallbackVisitor, false);
-
- ProxyVisitor proxyVisitor(H, C, _dllExport);
+ Cpp11ProxyVisitor proxyVisitor(H, C, _dllExport);
p->visit(&proxyVisitor, false);
- ObjectVisitor objectVisitor(H, C, _dllExport, _stream);
- p->visit(&objectVisitor, false);
+ Cpp11LocalObjectVisitor localObjectVisitor(H, C, _dllExport, _stream);
+ p->visit(&localObjectVisitor, false);
- //
- // We need to delay generating the template after the proxy
- // definition, because completed calls the begin_ method in the
- // proxy.
- //
- AsyncCallbackTemplateVisitor asyncCallbackTemplateVisitor(H, C, _dllExport);
- p->visit(&asyncCallbackTemplateVisitor, false);
+ Cpp11InterfaceVisitor interfaceVisitor(H, C, _dllExport, _stream);
+ p->visit(&interfaceVisitor, false);
- if(_impl)
+ Cpp11ValueVisitor valueVisitor(H, C, _dllExport, _stream);
+ p->visit(&valueVisitor, false);
+
+ // TODO
+ /*if(_impl)
{
implH << "\n#include <";
if(_include.size())
@@ -661,46 +645,65 @@ Slice::Gen::generate(const UnitPtr& p)
ImplVisitor implVisitor(implH, implC, _dllExport);
p->visit(&implVisitor, false);
- }
+ }*/
+
+ Cpp11CompatibilityVisitor compatibilityVisitor(H, C, _dllExport);
+ p->visit(&compatibilityVisitor, false);
generateChecksumMap(p);
}
H << sp;
H.zeroIndent();
- H << nl << "#else // C++11 mapping";
+ H << nl << "#else // C++98 mapping";
H.restoreIndent();
C << sp;
C.zeroIndent();
- C << nl << "#else // C++11 mapping";
+ C << nl << "#else // C++98 mapping";
C.restoreIndent();
{
- Cpp11ProxyDeclVisitor proxyDeclVisitor(H, C, _dllExport);
+ ProxyDeclVisitor proxyDeclVisitor(H, C, _dllExport);
p->visit(&proxyDeclVisitor, false);
- Cpp11ObjectDeclVisitor objectDeclVisitor(H, C, _dllExport);
+ ObjectDeclVisitor objectDeclVisitor(H, C, _dllExport);
p->visit(&objectDeclVisitor, false);
- Cpp11TypesVisitor typesVisitor(H, C, _dllExport);
+ TypesVisitor typesVisitor(H, C, _dllExport, _stream);
p->visit(&typesVisitor, false);
- Cpp11StreamVisitor streamVisitor(H, C, _dllExport);
+ StreamVisitor streamVisitor(H, C, _dllExport);
p->visit(&streamVisitor, false);
- Cpp11ProxyVisitor proxyVisitor(H, C, _dllExport);
- p->visit(&proxyVisitor, false);
+ AsyncVisitor asyncVisitor(H, C, _dllExport);
+ p->visit(&asyncVisitor, false);
- Cpp11LocalObjectVisitor localObjectVisitor(H, C, _dllExport, _stream);
- p->visit(&localObjectVisitor, false);
+ AsyncImplVisitor asyncImplVisitor(H, C, _dllExport);
+ p->visit(&asyncImplVisitor, false);
- Cpp11InterfaceVisitor interfaceVisitor(H, C, _dllExport, _stream);
- p->visit(&interfaceVisitor, false);
+ //
+ // The templates are emitted before the proxy definition
+ // so the derivation hierarchy is known to the proxy:
+ // the proxy relies on knowing the hierarchy to make the begin_
+ // methods type-safe.
+ //
+ AsyncCallbackVisitor asyncCallbackVisitor(H, C, _dllExport);
+ p->visit(&asyncCallbackVisitor, false);
- Cpp11ValueVisitor valueVisitor(H, C, _dllExport, _stream);
- p->visit(&valueVisitor, false);
+ ProxyVisitor proxyVisitor(H, C, _dllExport);
+ p->visit(&proxyVisitor, false);
- // TODO
- /*if(_impl)
+ ObjectVisitor objectVisitor(H, C, _dllExport, _stream);
+ p->visit(&objectVisitor, false);
+
+ //
+ // We need to delay generating the template after the proxy
+ // definition, because completed calls the begin_ method in the
+ // proxy.
+ //
+ AsyncCallbackTemplateVisitor asyncCallbackTemplateVisitor(H, C, _dllExport);
+ p->visit(&asyncCallbackTemplateVisitor, false);
+
+ if(_impl)
{
implH << "\n#include <";
if(_include.size())
@@ -720,23 +723,20 @@ Slice::Gen::generate(const UnitPtr& p)
ImplVisitor implVisitor(implH, implC, _dllExport);
p->visit(&implVisitor, false);
- }*/
-
- Cpp11CompatibilityVisitor compatibilityVisitor(H, C, _dllExport);
- p->visit(&compatibilityVisitor, false);
+ }
generateChecksumMap(p);
-
- H << sp;
- H.zeroIndent();
- H << nl << "#endif";
- H.restoreIndent();
-
- C << sp;
- C.zeroIndent();
- C << nl << "#endif";
- C.restoreIndent();
}
+
+ H << sp;
+ H.zeroIndent();
+ H << nl << "#endif";
+ H.restoreIndent();
+
+ C << sp;
+ C.zeroIndent();
+ C << nl << "#endif";
+ C.restoreIndent();
}
void