summaryrefslogtreecommitdiff
path: root/ACE/TAO/DevGuideExamples/AMH_AMI/inner_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/TAO/DevGuideExamples/AMH_AMI/inner_i.cpp')
-rw-r--r--ACE/TAO/DevGuideExamples/AMH_AMI/inner_i.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/ACE/TAO/DevGuideExamples/AMH_AMI/inner_i.cpp b/ACE/TAO/DevGuideExamples/AMH_AMI/inner_i.cpp
new file mode 100644
index 00000000000..c1c696ecbc2
--- /dev/null
+++ b/ACE/TAO/DevGuideExamples/AMH_AMI/inner_i.cpp
@@ -0,0 +1,31 @@
+#include "amh_ami_pch.h"
+/* -*- C++ -*- $Id$ */
+
+// ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******
+// TAO and the TAO IDL Compiler have been developed by the Center for
+// Distributed Object Computing at Washington University, St. Louis.
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+#include "inner_i.h"
+#include "ace/OS.h"
+
+Inner_i::Inner_i (int d)
+ : divisor_ (d)
+{
+}
+
+char *
+Inner_i::answer (const char * question)
+{
+ ACE_UNUSED_ARG (question); // doesn't matter
+
+ CORBA::String_var answer =
+ CORBA::string_dup ("I didn't know dogs could talk!");
+
+ int delay = 5/this->divisor_; // throw exception if divisor = 0
+
+ ACE_OS::sleep(delay); // make the caller wait a bit
+ return answer._retn();
+}