summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/ice/slice2Daemon.cpp2
-rw-r--r--project2/ice/slice2Rows.cpp2
-rw-r--r--project2/ice/slice2Task.cpp2
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;