summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Gen.h')
-rw-r--r--cpp/src/slice2cpp/Gen.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.h b/cpp/src/slice2cpp/Gen.h
index 0a92b659fe1..347611a335e 100644
--- a/cpp/src/slice2cpp/Gen.h
+++ b/cpp/src/slice2cpp/Gen.h
@@ -26,7 +26,8 @@ public:
const std::string&,
const std::vector<std::string>&,
const std::string&,
- const std::string&);
+ const std::string&,
+ bool);
~Gen();
bool operator!() const; // Returns true if there was a constructor error
@@ -38,10 +39,14 @@ private:
Output H;
Output C;
+ Output implH;
+ Output implC;
+
std::string _base;
std::string _include;
std::vector<std::string> _includePaths;
std::string _dllExport;
+ bool _impl;
class TypesVisitor : public ::IceUtil::noncopyable, public ParserVisitor
{
@@ -255,6 +260,29 @@ private:
std::string _dllExport;
};
+
+ class ImplVisitor : public ::IceUtil::noncopyable, public ParserVisitor
+ {
+ public:
+
+ ImplVisitor(Output&, Output&, const std::string&);
+
+ virtual bool visitModuleStart(const ModulePtr&);
+ virtual void visitModuleEnd(const ModulePtr&);
+ virtual bool visitClassDefStart(const ClassDefPtr&);
+
+ private:
+
+ Output& H;
+ Output& C;
+
+ std::string _dllExport;
+
+ //
+ // Generate code to assign a value
+ //
+ void writeAssign(Output&, const TypePtr&, const std::string&, int&);
+ };
};
}