/*
 *  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 __COSTRADINGREPOS_H__
#define __COSTRADINGREPOS_H__


#include <mico/CosTrading.h>



namespace CosTradingRepos {


class ServiceTypeRepository;
typedef ServiceTypeRepository *ServiceTypeRepository_ptr;
typedef ServiceTypeRepository_ptr ServiceTypeRepositoryRef;
typedef ObjVar<ServiceTypeRepository> ServiceTypeRepository_var;
typedef ObjOut<ServiceTypeRepository> ServiceTypeRepository_out;


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

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

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef ServiceTypeRepository_ptr _ptr_type;
    typedef ServiceTypeRepository_var _var_type;
    #endif

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

    static ServiceTypeRepository_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    typedef StringSequenceTmpl<CORBA::String_var> ServiceTypeNameSeq;
    #ifdef _WINDOWS
    static ServiceTypeNameSeq _dummy_ServiceTypeNameSeq;
    #endif
    typedef TSeqVar<StringSequenceTmpl<CORBA::String_var> > ServiceTypeNameSeq_var;
    typedef TSeqOut<StringSequenceTmpl<CORBA::String_var> > ServiceTypeNameSeq_out;

    enum PropertyMode {
      PROP_NORMAL = 0,
      PROP_READONLY,
      PROP_MANDATORY,
      PROP_MANDATORY_READONLY
    };

    typedef PropertyMode& PropertyMode_out;

    struct PropStruct;
    typedef TVarVar<PropStruct> PropStruct_var;
    typedef TVarOut<PropStruct> PropStruct_out;


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

      CosTrading::PropertyName_var name;
      CORBA::TypeCode_var value_type;
      PropertyMode mode;
    };

    typedef SequenceTmpl<PropStruct,MICO_TID_DEF> PropStructSeq;
    #ifdef _WINDOWS
    static PropStructSeq _dummy_PropStructSeq;
    #endif
    typedef TSeqVar<SequenceTmpl<PropStruct,MICO_TID_DEF> > PropStructSeq_var;
    typedef TSeqOut<SequenceTmpl<PropStruct,MICO_TID_DEF> > PropStructSeq_out;

    typedef char* Identifier;
    typedef CORBA::String_var Identifier_var;
    typedef CORBA::String_out Identifier_out;

    struct IncarnationNumber;
    typedef TFixVar<IncarnationNumber> IncarnationNumber_var;
    typedef IncarnationNumber& IncarnationNumber_out;


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

      CORBA::ULong high;
      CORBA::ULong low;
    };

    struct TypeStruct;
    typedef TVarVar<TypeStruct> TypeStruct_var;
    typedef TVarOut<TypeStruct> TypeStruct_out;


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

      Identifier_var if_name;
      PropStructSeq props;
      ServiceTypeNameSeq super_types;
      CORBA::Boolean masked;
      IncarnationNumber incarnation;
    };

    enum ListOption {
      all = 0,
      since
    };

    typedef ListOption& ListOption_out;

    class SpecifiedServiceTypes;
    typedef TFixVar<SpecifiedServiceTypes> SpecifiedServiceTypes_var;
    typedef SpecifiedServiceTypes& SpecifiedServiceTypes_out;


    class SpecifiedServiceTypes {
      public:
        #ifdef HAVE_TYPEDEF_OVERLOAD
        typedef SpecifiedServiceTypes_var _var_type;
        #endif
        ListOption _discriminator;

        struct __m {
          IncarnationNumber incarnation;
        } _m;

      public:
        #ifdef HAVE_EXPLICIT_STRUCT_OPS
        SpecifiedServiceTypes();
        ~SpecifiedServiceTypes();
        SpecifiedServiceTypes( const SpecifiedServiceTypes& s );
        SpecifiedServiceTypes& operator=( const SpecifiedServiceTypes& s );
        #endif //HAVE_EXPLICIT_STRUCT_OPS


        void _d( ListOption _p );
        ListOption _d() const;

        void incarnation( const IncarnationNumber& _p );
        const IncarnationNumber& incarnation() const;
        IncarnationNumber& incarnation();

        void _default();

    };

    struct ServiceTypeExists : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      ServiceTypeExists();
      ~ServiceTypeExists();
      ServiceTypeExists( const ServiceTypeExists& s );
      ServiceTypeExists& operator=( const ServiceTypeExists& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      #ifndef HAVE_EXPLICIT_STRUCT_OPS
      ServiceTypeExists();
      #endif //HAVE_EXPLICIT_STRUCT_OPS
      ServiceTypeExists( const char* _m0 );

      #ifdef HAVE_STD_EH
      ServiceTypeExists *operator->() { return this; }
      ServiceTypeExists& operator*() { return *this; }
      operator ServiceTypeExists*() { return this; }
      #endif // HAVE_STD_EH

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      void _encode_any( CORBA::Any &a ) const;
      CORBA::Exception *_clone() const;
      static ServiceTypeExists *_downcast( CORBA::Exception *ex );
      static const ServiceTypeExists *_downcast( const CORBA::Exception *ex );
      CosTrading::ServiceTypeName_var name;
    };

    #ifdef HAVE_STD_EH
    typedef ServiceTypeExists ServiceTypeExists_catch;
    #else
    typedef ExceptVar<ServiceTypeExists> ServiceTypeExists_var;
    typedef TVarOut<ServiceTypeExists> ServiceTypeExists_out;
    typedef ServiceTypeExists_var ServiceTypeExists_catch;
    #endif // HAVE_STD_EH

    struct InterfaceTypeMismatch : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      InterfaceTypeMismatch();
      ~InterfaceTypeMismatch();
      InterfaceTypeMismatch( const InterfaceTypeMismatch& s );
      InterfaceTypeMismatch& operator=( const InterfaceTypeMismatch& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      #ifndef HAVE_EXPLICIT_STRUCT_OPS
      InterfaceTypeMismatch();
      #endif //HAVE_EXPLICIT_STRUCT_OPS
      InterfaceTypeMismatch( const char* _m0, const char* _m1, const char* _m2, const char* _m3 );

      #ifdef HAVE_STD_EH
      InterfaceTypeMismatch *operator->() { return this; }
      InterfaceTypeMismatch& operator*() { return *this; }
      operator InterfaceTypeMismatch*() { return this; }
      #endif // HAVE_STD_EH

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      void _encode_any( CORBA::Any &a ) const;
      CORBA::Exception *_clone() const;
      static InterfaceTypeMismatch *_downcast( CORBA::Exception *ex );
      static const InterfaceTypeMismatch *_downcast( const CORBA::Exception *ex );
      CosTrading::ServiceTypeName_var base_service;
      Identifier_var base_if;
      CosTrading::ServiceTypeName_var derived_service;
      Identifier_var derived_if;
    };

    #ifdef HAVE_STD_EH
    typedef InterfaceTypeMismatch InterfaceTypeMismatch_catch;
    #else
    typedef ExceptVar<InterfaceTypeMismatch> InterfaceTypeMismatch_var;
    typedef TVarOut<InterfaceTypeMismatch> InterfaceTypeMismatch_out;
    typedef InterfaceTypeMismatch_var InterfaceTypeMismatch_catch;
    #endif // HAVE_STD_EH

    struct HasSubTypes : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      HasSubTypes();
      ~HasSubTypes();
      HasSubTypes( const HasSubTypes& s );
      HasSubTypes& operator=( const HasSubTypes& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      #ifndef HAVE_EXPLICIT_STRUCT_OPS
      HasSubTypes();
      #endif //HAVE_EXPLICIT_STRUCT_OPS
      HasSubTypes( const char* _m0, const char* _m1 );

      #ifdef HAVE_STD_EH
      HasSubTypes *operator->() { return this; }
      HasSubTypes& operator*() { return *this; }
      operator HasSubTypes*() { return this; }
      #endif // HAVE_STD_EH

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      void _encode_any( CORBA::Any &a ) const;
      CORBA::Exception *_clone() const;
      static HasSubTypes *_downcast( CORBA::Exception *ex );
      static const HasSubTypes *_downcast( const CORBA::Exception *ex );
      CosTrading::ServiceTypeName_var the_type;
      CosTrading::ServiceTypeName_var sub_type;
    };

    #ifdef HAVE_STD_EH
    typedef HasSubTypes HasSubTypes_catch;
    #else
    typedef ExceptVar<HasSubTypes> HasSubTypes_var;
    typedef TVarOut<HasSubTypes> HasSubTypes_out;
    typedef HasSubTypes_var HasSubTypes_catch;
    #endif // HAVE_STD_EH

    struct AlreadyMasked : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      AlreadyMasked();
      ~AlreadyMasked();
      AlreadyMasked( const AlreadyMasked& s );
      AlreadyMasked& operator=( const AlreadyMasked& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      #ifndef HAVE_EXPLICIT_STRUCT_OPS
      AlreadyMasked();
      #endif //HAVE_EXPLICIT_STRUCT_OPS
      AlreadyMasked( const char* _m0 );

      #ifdef HAVE_STD_EH
      AlreadyMasked *operator->() { return this; }
      AlreadyMasked& operator*() { return *this; }
      operator AlreadyMasked*() { return this; }
      #endif // HAVE_STD_EH

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      void _encode_any( CORBA::Any &a ) const;
      CORBA::Exception *_clone() const;
      static AlreadyMasked *_downcast( CORBA::Exception *ex );
      static const AlreadyMasked *_downcast( const CORBA::Exception *ex );
      CosTrading::ServiceTypeName_var name;
    };

    #ifdef HAVE_STD_EH
    typedef AlreadyMasked AlreadyMasked_catch;
    #else
    typedef ExceptVar<AlreadyMasked> AlreadyMasked_var;
    typedef TVarOut<AlreadyMasked> AlreadyMasked_out;
    typedef AlreadyMasked_var AlreadyMasked_catch;
    #endif // HAVE_STD_EH

    struct NotMasked : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      NotMasked();
      ~NotMasked();
      NotMasked( const NotMasked& s );
      NotMasked& operator=( const NotMasked& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      #ifndef HAVE_EXPLICIT_STRUCT_OPS
      NotMasked();
      #endif //HAVE_EXPLICIT_STRUCT_OPS
      NotMasked( const char* _m0 );

      #ifdef HAVE_STD_EH
      NotMasked *operator->() { return this; }
      NotMasked& operator*() { return *this; }
      operator NotMasked*() { return this; }
      #endif // HAVE_STD_EH

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      void _encode_any( CORBA::Any &a ) const;
      CORBA::Exception *_clone() const;
      static NotMasked *_downcast( CORBA::Exception *ex );
      static const NotMasked *_downcast( const CORBA::Exception *ex );
      CosTrading::ServiceTypeName_var name;
    };

    #ifdef HAVE_STD_EH
    typedef NotMasked NotMasked_catch;
    #else
    typedef ExceptVar<NotMasked> NotMasked_var;
    typedef TVarOut<NotMasked> NotMasked_out;
    typedef NotMasked_var NotMasked_catch;
    #endif // HAVE_STD_EH

    struct ValueTypeRedefinition : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      ValueTypeRedefinition();
      ~ValueTypeRedefinition();
      ValueTypeRedefinition( const ValueTypeRedefinition& s );
      ValueTypeRedefinition& operator=( const ValueTypeRedefinition& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      #ifndef HAVE_EXPLICIT_STRUCT_OPS
      ValueTypeRedefinition();
      #endif //HAVE_EXPLICIT_STRUCT_OPS
      ValueTypeRedefinition( const char* _m0, const PropStruct& _m1, const char* _m2, const PropStruct& _m3 );

      #ifdef HAVE_STD_EH
      ValueTypeRedefinition *operator->() { return this; }
      ValueTypeRedefinition& operator*() { return *this; }
      operator ValueTypeRedefinition*() { return this; }
      #endif // HAVE_STD_EH

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      void _encode_any( CORBA::Any &a ) const;
      CORBA::Exception *_clone() const;
      static ValueTypeRedefinition *_downcast( CORBA::Exception *ex );
      static const ValueTypeRedefinition *_downcast( const CORBA::Exception *ex );
      CosTrading::ServiceTypeName_var type_1;
      PropStruct definition_1;
      CosTrading::ServiceTypeName_var type_2;
      PropStruct definition_2;
    };

    #ifdef HAVE_STD_EH
    typedef ValueTypeRedefinition ValueTypeRedefinition_catch;
    #else
    typedef ExceptVar<ValueTypeRedefinition> ValueTypeRedefinition_var;
    typedef TVarOut<ValueTypeRedefinition> ValueTypeRedefinition_out;
    typedef ValueTypeRedefinition_var ValueTypeRedefinition_catch;
    #endif // HAVE_STD_EH

    struct DuplicateServiceTypeName : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      DuplicateServiceTypeName();
      ~DuplicateServiceTypeName();
      DuplicateServiceTypeName( const DuplicateServiceTypeName& s );
      DuplicateServiceTypeName& operator=( const DuplicateServiceTypeName& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      #ifndef HAVE_EXPLICIT_STRUCT_OPS
      DuplicateServiceTypeName();
      #endif //HAVE_EXPLICIT_STRUCT_OPS
      DuplicateServiceTypeName( const char* _m0 );

      #ifdef HAVE_STD_EH
      DuplicateServiceTypeName *operator->() { return this; }
      DuplicateServiceTypeName& operator*() { return *this; }
      operator DuplicateServiceTypeName*() { return this; }
      #endif // HAVE_STD_EH

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      void _encode_any( CORBA::Any &a ) const;
      CORBA::Exception *_clone() const;
      static DuplicateServiceTypeName *_downcast( CORBA::Exception *ex );
      static const DuplicateServiceTypeName *_downcast( const CORBA::Exception *ex );
      CosTrading::ServiceTypeName_var name;
    };

    #ifdef HAVE_STD_EH
    typedef DuplicateServiceTypeName DuplicateServiceTypeName_catch;
    #else
    typedef ExceptVar<DuplicateServiceTypeName> DuplicateServiceTypeName_var;
    typedef TVarOut<DuplicateServiceTypeName> DuplicateServiceTypeName_out;
    typedef DuplicateServiceTypeName_var DuplicateServiceTypeName_catch;
    #endif // HAVE_STD_EH

    virtual IncarnationNumber incarnation() = 0;

    virtual IncarnationNumber add_type( const char* name, const char* if_name, const PropStructSeq& props, const ServiceTypeNameSeq& super_types ) = 0;
    virtual void remove_type( const char* name ) = 0;
    virtual ServiceTypeNameSeq* list_types( const SpecifiedServiceTypes& which_types ) = 0;
    virtual TypeStruct* describe_type( const char* name ) = 0;
    virtual TypeStruct* fully_describe_type( const char* name ) = 0;
    virtual void mask_type( const char* name ) = 0;
    virtual void unmask_type( const char* name ) = 0;

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

// Stub for interface ServiceTypeRepository
class ServiceTypeRepository_stub:
  virtual public ServiceTypeRepository
{
  public:
    virtual ~ServiceTypeRepository_stub();
    IncarnationNumber incarnation();

    IncarnationNumber add_type( const char* name, const char* if_name, const PropStructSeq& props, const ServiceTypeNameSeq& super_types );
    void remove_type( const char* name );
    ServiceTypeNameSeq* list_types( const SpecifiedServiceTypes& which_types );
    TypeStruct* describe_type( const char* name );
    TypeStruct* fully_describe_type( const char* name );
    void mask_type( const char* name );
    void unmask_type( const char* name );

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

class ServiceTypeRepository_skel :
  virtual public StaticMethodDispatcher,
  virtual public ServiceTypeRepository
{
  public:
    ServiceTypeRepository_skel( const CORBA::BOA::ReferenceData & = CORBA::BOA::ReferenceData() );
    virtual ~ServiceTypeRepository_skel();
    ServiceTypeRepository_skel( CORBA::Object_ptr obj );
    virtual bool dispatch( CORBA::StaticServerRequest_ptr __req, CORBA::Environment &_env );
    ServiceTypeRepository_ptr _this();

};

}


#ifndef MICO_CONF_NO_POA

#endif // MICO_CONF_NO_POA

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_PropertyMode;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_PropStruct;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_IncarnationNumber;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_TypeStruct;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_ListOption;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_SpecifiedServiceTypes;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_ServiceTypeExists;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_InterfaceTypeMismatch;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_HasSubTypes;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_AlreadyMasked;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_NotMasked;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_ValueTypeRedefinition;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository_DuplicateServiceTypeName;

extern CORBA::StaticTypeInfo *_marshaller_CosTradingRepos_ServiceTypeRepository;

extern CORBA::StaticTypeInfo *_marshaller__seq_CosTradingRepos_ServiceTypeRepository_PropStruct;

#endif
