/*
  Hallo_impl.cpp

  This class is a simple Corba server which only can say "Hallo" to me.
  Boring, you may think ...

  Author: Ingo Kloeckl
 */

#include <OB/CORBA.h>
#include <Hallo_impl.h>

#ifdef HAVE_STD_IOSTREAM
using namespace std;
#endif

Hallo_impl::Hallo_impl(CORBA::ORB_ptr orb, const char* pName) : 
  orb_(CORBA::ORB::_duplicate(orb)),
  m_strName(pName) {
}

void Hallo_impl::sayHi() throw (CORBA::SystemException){
  cout << "Hallo Ingo!" << endl;
}

void Hallo_impl::shutdown() throw (CORBA::SystemException){
  orb_->shutdown(false);
}

char* Hallo_impl::name() throw (CORBA::SystemException){
  return CORBA::string_dup(this->m_strName.c_str());
}

