summaryrefslogtreecommitdiff
path: root/trunk/TAO/examples/Simple/time/Time_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/TAO/examples/Simple/time/Time_i.cpp')
-rw-r--r--trunk/TAO/examples/Simple/time/Time_i.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/trunk/TAO/examples/Simple/time/Time_i.cpp b/trunk/TAO/examples/Simple/time/Time_i.cpp
new file mode 100644
index 00000000000..c9905bef9b7
--- /dev/null
+++ b/trunk/TAO/examples/Simple/time/Time_i.cpp
@@ -0,0 +1,51 @@
+// $Id$
+
+#include "Time_i.h"
+#include "ace/OS_NS_time.h"
+
+ACE_RCSID(Time, Time_i, "$Id$")
+
+// Constructor
+Time_i::Time_i (void)
+{
+ // no-op
+}
+
+// Destructor
+
+Time_i::~Time_i (void)
+{
+ // no-op
+}
+
+// Set the ORB pointer.
+
+void
+Time_i::orb (CORBA::ORB_ptr o)
+{
+ this->orb_ = CORBA::ORB::_duplicate (o);
+}
+
+// Return the current date/time on the server.
+
+CORBA::Long
+Time_i::current_time (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return CORBA::Long (ACE_OS::time (0));
+}
+
+// Shutdown.
+
+void
+Time_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "%s\n",
+ "Time_i is shutting down"));
+
+ // Instruct the ORB to shutdown.
+ this->orb_->shutdown ();
+}
+