diff options
author | Dan Goodliffe <randomdan@riogrande.random.lan> | 2014-12-03 01:13:37 +0000 |
---|---|---|
committer | Dan Goodliffe <randomdan@riogrande.random.lan> | 2014-12-03 01:13:37 +0000 |
commit | 64b0e9e28430eb1a8f24c01c91d2ce29fabdcebe (patch) | |
tree | 12b17c2b48dcef71e96a3db548648c11a7b54a85 | |
parent | Don't create a daemon module for each ice module (they can occur multiple tim... (diff) | |
download | project2-64b0e9e28430eb1a8f24c01c91d2ce29fabdcebe.tar.bz2 project2-64b0e9e28430eb1a8f24c01c91d2ce29fabdcebe.tar.xz project2-64b0e9e28430eb1a8f24c01c91d2ce29fabdcebe.zip |
Don't create things for classes with no operations
-rw-r--r-- | project2/ice/slice2Daemon.cpp | 2 | ||||
-rw-r--r-- | project2/ice/slice2Rows.cpp | 2 | ||||
-rw-r--r-- | project2/ice/slice2Task.cpp | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/project2/ice/slice2Daemon.cpp b/project2/ice/slice2Daemon.cpp index 3e889d3..73da741 100644 --- a/project2/ice/slice2Daemon.cpp +++ b/project2/ice/slice2Daemon.cpp @@ -19,6 +19,8 @@ Slice2Daemon::visitModuleStart(const Slice::ModulePtr & m) bool Slice2Daemon::visitClassDefStart(const Slice::ClassDefPtr & c) { + if (c->operations().empty()) return false; + interface = c->name(); fprintf(code, "\tclass %sImpl : public IceDaemonModule, public %s {\n", c->name().c_str(), c->name().c_str()); fprintf(code, "\t\tpublic:\n"); diff --git a/project2/ice/slice2Rows.cpp b/project2/ice/slice2Rows.cpp index cea2d6b..10d319e 100644 --- a/project2/ice/slice2Rows.cpp +++ b/project2/ice/slice2Rows.cpp @@ -20,6 +20,8 @@ Slice2Rows::visitModuleStart(const Slice::ModulePtr & m) bool Slice2Rows::visitClassDefStart(const Slice::ClassDefPtr & c) { + if (c->operations().empty()) return false; + interface = c->name(); fprintf(code, "\t\tnamespace %s {\n", c->name().c_str()); return true; diff --git a/project2/ice/slice2Task.cpp b/project2/ice/slice2Task.cpp index 1fbacaf..16be9e0 100644 --- a/project2/ice/slice2Task.cpp +++ b/project2/ice/slice2Task.cpp @@ -20,6 +20,8 @@ Slice2Task::visitModuleStart(const Slice::ModulePtr & m) bool Slice2Task::visitClassDefStart(const Slice::ClassDefPtr & c) { + if (c->operations().empty()) return false; + interface = c->name(); fprintf(code, "\t\tnamespace %s {\n", c->name().c_str()); return true; |