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

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

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

#ifdef MICO_IN_GENERATED_CODE
#include <mico/CosObjectIdentity.h>
#else
#define MICO_IN_GENERATED_CODE
#include <mico/CosObjectIdentity.h>
#undef MICO_IN_GENERATED_CODE
#endif

#ifdef MICO_IN_GENERATED_CODE
#include <mico/ir_base.h>
#else
#define MICO_IN_GENERATED_CODE
#include <mico/ir_base.h>
#undef MICO_IN_GENERATED_CODE
#endif

#ifdef MICO_IN_GENERATED_CODE
#include <mico/ir.h>
#else
#define MICO_IN_GENERATED_CODE
#include <mico/ir.h>
#undef MICO_IN_GENERATED_CODE
#endif

#ifdef MICO_IN_GENERATED_CODE
#include <mico/CosRelationships.h>
#else
#define MICO_IN_GENERATED_CODE
#include <mico/CosRelationships.h>
#undef MICO_IN_GENERATED_CODE
#endif

#ifdef MICO_IN_GENERATED_CODE
#include <mico/CosGraphs.h>
#else
#define MICO_IN_GENERATED_CODE
#include <mico/CosGraphs.h>
#undef MICO_IN_GENERATED_CODE
#endif

#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL CosReference {
#endif

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


class Relationship;
typedef Relationship *Relationship_ptr;
typedef Relationship_ptr RelationshipRef;
typedef ObjVar<Relationship> Relationship_var;
typedef Relationship_var Relationship_out;


// Common definitions for interface Relationship
class Relationship : 
  virtual public ::CosRelationships::Relationship
{
  public:
    virtual ~Relationship();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef Relationship_ptr _ptr_type;
    typedef Relationship_var _var_type;
    #endif

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

    static Relationship_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 );

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

// Stub for interface Relationship
class Relationship_stub:
  virtual public Relationship,
  virtual public ::CosRelationships::Relationship_stub
{
  public:
    virtual ~Relationship_stub();
  private:
    void operator=( const Relationship_stub& );
};

#ifndef MICO_CONF_NO_POA

class Relationship_stub_clp :
  virtual public Relationship_stub,
  virtual public ::CosRelationships::Relationship_stub_clp
{
  public:
    Relationship_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~Relationship_stub_clp ();
  protected:
    Relationship_stub_clp ();
  private:
    void operator=( const Relationship_stub_clp & );
};

#endif // MICO_CONF_NO_POA

class ReferencesRole;
typedef ReferencesRole *ReferencesRole_ptr;
typedef ReferencesRole_ptr ReferencesRoleRef;
typedef ObjVar<ReferencesRole> ReferencesRole_var;
typedef ReferencesRole_var ReferencesRole_out;


// Common definitions for interface ReferencesRole
class ReferencesRole : 
  virtual public ::CosGraphs::Role
{
  public:
    virtual ~ReferencesRole();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef ReferencesRole_ptr _ptr_type;
    typedef ReferencesRole_var _var_type;
    #endif

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

    static ReferencesRole_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 );

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

// Stub for interface ReferencesRole
class ReferencesRole_stub:
  virtual public ReferencesRole,
  virtual public ::CosGraphs::Role_stub
{
  public:
    virtual ~ReferencesRole_stub();
  private:
    void operator=( const ReferencesRole_stub& );
};

#ifndef MICO_CONF_NO_POA

class ReferencesRole_stub_clp :
  virtual public ReferencesRole_stub,
  virtual public ::CosGraphs::Role_stub_clp
{
  public:
    ReferencesRole_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~ReferencesRole_stub_clp ();
  protected:
    ReferencesRole_stub_clp ();
  private:
    void operator=( const ReferencesRole_stub_clp & );
};

#endif // MICO_CONF_NO_POA

class ReferencedByRole;
typedef ReferencedByRole *ReferencedByRole_ptr;
typedef ReferencedByRole_ptr ReferencedByRoleRef;
typedef ObjVar<ReferencedByRole> ReferencedByRole_var;
typedef ReferencedByRole_var ReferencedByRole_out;


// Common definitions for interface ReferencedByRole
class ReferencedByRole : 
  virtual public ::CosGraphs::Role
{
  public:
    virtual ~ReferencedByRole();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef ReferencedByRole_ptr _ptr_type;
    typedef ReferencedByRole_var _var_type;
    #endif

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

    static ReferencedByRole_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 );

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

// Stub for interface ReferencedByRole
class ReferencedByRole_stub:
  virtual public ReferencedByRole,
  virtual public ::CosGraphs::Role_stub
{
  public:
    virtual ~ReferencedByRole_stub();
  private:
    void operator=( const ReferencedByRole_stub& );
};

#ifndef MICO_CONF_NO_POA

class ReferencedByRole_stub_clp :
  virtual public ReferencedByRole_stub,
  virtual public ::CosGraphs::Role_stub_clp
{
  public:
    ReferencedByRole_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~ReferencedByRole_stub_clp ();
  protected:
    ReferencedByRole_stub_clp ();
  private:
    void operator=( const ReferencedByRole_stub_clp & );
};

#endif // MICO_CONF_NO_POA

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

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif



#ifndef MICO_CONF_NO_POA

#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL POA_CosReference {
#endif

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


class Relationship : 
  virtual public POA_CosRelationships::Relationship
{
  public:
    virtual ~Relationship ();
    CosReference::Relationship_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 Relationship * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

  protected:
    Relationship () {};

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

#ifdef HAVE_NAMESPACE

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

    PortableServer::POA_ptr _default_POA ();

  protected:
    Relationship_tie () {};

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

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

template<class T>
PortableServer::POA_ptr
Relationship_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 ();
}

#endif

class ReferencesRole : 
  virtual public POA_CosGraphs::Role
{
  public:
    virtual ~ReferencesRole ();
    CosReference::ReferencesRole_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 ReferencesRole * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

  protected:
    ReferencesRole () {};

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

#ifdef HAVE_NAMESPACE

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

    PortableServer::POA_ptr _default_POA ();

  protected:
    ReferencesRole_tie () {};

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

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

template<class T>
PortableServer::POA_ptr
ReferencesRole_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 ();
}

#endif

class ReferencedByRole : 
  virtual public POA_CosGraphs::Role
{
  public:
    virtual ~ReferencedByRole ();
    CosReference::ReferencedByRole_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 ReferencedByRole * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

  protected:
    ReferencedByRole () {};

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

#ifdef HAVE_NAMESPACE

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

    PortableServer::POA_ptr _default_POA ();

  protected:
    ReferencedByRole_tie () {};

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

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

template<class T>
PortableServer::POA_ptr
ReferencedByRole_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 ();
}

#endif

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

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif



#ifndef HAVE_NAMESPACE

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

    PortableServer::POA_ptr _default_POA ();

  protected:
    POA_CosReference_Relationship_tie () {};

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

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

template<class T>
PortableServer::POA_ptr
POA_CosReference_Relationship_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 ();
}

#endif

#ifndef HAVE_NAMESPACE

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

    PortableServer::POA_ptr _default_POA ();

  protected:
    POA_CosReference_ReferencesRole_tie () {};

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

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

template<class T>
PortableServer::POA_ptr
POA_CosReference_ReferencesRole_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 ();
}

#endif

#ifndef HAVE_NAMESPACE

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

    PortableServer::POA_ptr _default_POA ();

  protected:
    POA_CosReference_ReferencedByRole_tie () {};

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

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

template<class T>
PortableServer::POA_ptr
POA_CosReference_ReferencedByRole_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 ();
}

#endif

#endif // MICO_CONF_NO_POA

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

extern CORBA::StaticTypeInfo *_marshaller_CosReference_Relationship;

extern CORBA::StaticTypeInfo *_marshaller_CosReference_ReferencesRole;

extern CORBA::StaticTypeInfo *_marshaller_CosReference_ReferencedByRole;

#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
