/*
 *  MICO --- a free CORBA implementation
 *  Copyright (C) 1997-98 Kay Roemer & Arno Puder
 *
 *  This file was automatically generated. DO NOT EDIT!
 */

#if !defined(__ROBOT_H__) || defined(MICO_NO_TOPLEVEL_MODULES)
#define __ROBOT_H__

#ifndef MICO_NO_TOPLEVEL_MODULES
#include <CORBA.h>
#include <mico/throw.h>
#endif

struct Robot_Command;
typedef TFixVar<Robot_Command> Robot_Command_var;
typedef Robot_Command_var Robot_Command_out;

struct Robot_Command {
  #ifdef HAVE_TYPEDEF_OVERLOAD
  typedef Robot_Command_var _var_type;
  #endif
  #ifdef HAVE_EXPLICIT_STRUCT_OPS
  Robot_Command();
  ~Robot_Command();
  Robot_Command( const Robot_Command& s );
  Robot_Command& operator=( const Robot_Command& s );
  #endif //HAVE_EXPLICIT_STRUCT_OPS

  CORBA::Long command;
  CORBA::Long lparam;
  CORBA::Double param[ 20 ];
};

extern CORBA::TypeCodeConst _tc_Robot_Command;

class Robot;
typedef Robot *Robot_ptr;
typedef Robot_ptr RobotRef;
typedef ObjVar<Robot> Robot_var;
typedef Robot_var Robot_out;


// Common definitions for interface Robot
class Robot : 
  virtual public CORBA::Object
{
  public:
    virtual ~Robot();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef Robot_ptr _ptr_type;
    typedef Robot_var _var_type;
    #endif

    static Robot_ptr _narrow( CORBA::Object_ptr obj );
    static Robot_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static Robot_ptr _duplicate( Robot_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static Robot_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );
    static vector<CORBA::Narrow_proto> *_narrow_helpers;
    static bool _narrow_helper2( CORBA::Object_ptr obj );

    virtual CORBA::Long put_command( const CORBA::Any& any_command ) = 0;
    virtual CORBA::Long get_info( CORBA::Any& any_command ) = 0;

  protected:
    Robot() {};
  private:
    Robot( const Robot& );
    void operator=( const Robot& );
};

extern CORBA::TypeCodeConst _tc_Robot;

// Stub for interface Robot
class Robot_stub:
  virtual public Robot
{
  public:
    virtual ~Robot_stub();
    CORBA::Long put_command( const CORBA::Any& any_command );
    CORBA::Long get_info( CORBA::Any& any_command );

  private:
    void operator=( const Robot_stub& );
};

#ifndef MICO_CONF_NO_POA

class Robot_stub_clp :
  virtual public Robot_stub,
  virtual public PortableServer::StubBase
{
  public:
    Robot_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~Robot_stub_clp ();
    CORBA::Long put_command( const CORBA::Any& any_command );
    CORBA::Long get_info( CORBA::Any& any_command );

  protected:
    Robot_stub_clp ();
  private:
    void operator=( const Robot_stub_clp & );
};

#endif // MICO_CONF_NO_POA

#ifndef MICO_CONF_NO_POA

class POA_Robot : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~POA_Robot ();
    Robot_ptr _this ();
    bool dispatch (CORBA::StaticServerRequest_ptr);
    virtual void invoke (CORBA::StaticServerRequest_ptr);
    virtual CORBA::Boolean _is_a (const char *);
    virtual CORBA::InterfaceDef_ptr _get_interface ();
    virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr);

    virtual void * _narrow_helper (const char *);
    static POA_Robot * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual CORBA::Long put_command( const CORBA::Any& any_command ) = 0;
    virtual CORBA::Long get_info( CORBA::Any& any_command ) = 0;

  protected:
    POA_Robot () {};

  private:
    POA_Robot (const POA_Robot &);
    void operator= (const POA_Robot &);
};

template<class T>
class POA_Robot_tie : 
  virtual public POA_Tie_Base<T>,
  virtual public POA_Robot
{
  public:
    POA_Robot_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    POA_Robot_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    POA_Robot_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    POA_Robot_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~POA_Robot_tie ();

    PortableServer::POA_ptr _default_POA ();

    CORBA::Long put_command( const CORBA::Any& any_command );
    CORBA::Long get_info( CORBA::Any& any_command );

  protected:
    POA_Robot_tie () {};

  private:
    POA_Robot_tie (const POA_Robot_tie<T> &);
    void operator= (const POA_Robot_tie<T> &);
};

template<class T>
POA_Robot_tie<T>::~POA_Robot_tie ()
{
}

template<class T>
PortableServer::POA_ptr
POA_Robot_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
CORBA::Long
POA_Robot_tie<T>::put_command (const CORBA::Any& any_command)
{
  return POA_Tie_Base<T>::ptr->put_command (any_command);
}

template<class T>
CORBA::Long
POA_Robot_tie<T>::get_info (CORBA::Any& any_command)
{
  return POA_Tie_Base<T>::ptr->get_info (any_command);
}

#endif // MICO_CONF_NO_POA

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)

void operator<<=( CORBA::Any &_a, const ::Robot_Command &_s );
void operator<<=( CORBA::Any &_a, ::Robot_Command *_s );
CORBA::Boolean operator>>=( const CORBA::Any &_a, ::Robot_Command &_s );
CORBA::Boolean operator>>=( const CORBA::Any &_a, ::Robot_Command *&_s );

extern CORBA::StaticTypeInfo *_marshaller_Robot_Command;

void operator<<=( CORBA::Any &a, const Robot_ptr obj );
void operator<<=( CORBA::Any &a, Robot_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, Robot_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_Robot;

extern CORBA::StaticTypeInfo *_marshaller__a20_double;

#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)


#if !defined(MICO_NO_TOPLEVEL_MODULES) && !defined(MICO_IN_GENERATED_CODE)
#include <mico/template_impl.h>
#endif

#endif
