/*
 *  MICO --- an Open Source CORBA implementation
 *  Copyright (c) 1997-2001 by The Mico Team
 *
 *  This file was automatically generated. DO NOT EDIT!
 */

#include <CORBA.h>
#include <mico/throw.h>

#ifndef __COSOBJECTIDENTITY_H__
#define __COSOBJECTIDENTITY_H__





namespace CosObjectIdentity {


typedef CORBA::ULong ObjectIdentifier;
typedef ObjectIdentifier& ObjectIdentifier_out;
class IdentifiableObject;
typedef IdentifiableObject *IdentifiableObject_ptr;
typedef IdentifiableObject_ptr IdentifiableObjectRef;
typedef ObjVar<IdentifiableObject> IdentifiableObject_var;
typedef ObjOut<IdentifiableObject> IdentifiableObject_out;


/*
 * Base class and common definitions for interface IdentifiableObject
 */

class IdentifiableObject : 
  virtual public CORBA::Object
{
  public:
    virtual ~IdentifiableObject();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef IdentifiableObject_ptr _ptr_type;
    typedef IdentifiableObject_var _var_type;
    #endif

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

    static IdentifiableObject_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual ObjectIdentifier constant_random_id() = 0;

    virtual CORBA::Boolean is_identical( IdentifiableObject_ptr other_object ) = 0;

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

// Stub for interface IdentifiableObject
class IdentifiableObject_stub:
  virtual public IdentifiableObject
{
  public:
    virtual ~IdentifiableObject_stub();
    ObjectIdentifier constant_random_id();

    CORBA::Boolean is_identical( IdentifiableObject_ptr other_object );

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

#ifndef MICO_CONF_NO_POA

class IdentifiableObject_stub_clp :
  virtual public IdentifiableObject_stub,
  virtual public PortableServer::StubBase
{
  public:
    IdentifiableObject_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~IdentifiableObject_stub_clp ();
    ObjectIdentifier constant_random_id();

    CORBA::Boolean is_identical( IdentifiableObject_ptr other_object );

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

#endif // MICO_CONF_NO_POA

}


#ifndef MICO_CONF_NO_POA



namespace POA_CosObjectIdentity {


class IdentifiableObject : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~IdentifiableObject ();
    CosObjectIdentity::IdentifiableObject_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 IdentifiableObject * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual CosObjectIdentity::ObjectIdentifier constant_random_id() = 0;

    virtual CORBA::Boolean is_identical( CosObjectIdentity::IdentifiableObject_ptr other_object ) = 0;

  protected:
    IdentifiableObject () {};

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

}


#endif // MICO_CONF_NO_POA

extern CORBA::StaticTypeInfo *_marshaller_CosObjectIdentity_IdentifiableObject;

#endif
