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

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

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

class unions;
typedef unions *unions_ptr;
typedef unions_ptr unionsRef;
typedef ObjVar<unions> unions_var;
typedef unions_var unions_out;


// Common definitions for interface unions
class unions : virtual public CORBA::Object
{
  public:
    virtual ~unions();
    static unions_ptr _duplicate( unions_ptr obj );
    static unions_ptr _narrow( CORBA::Object_ptr obj );
    static unions_ptr _nil();

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

    class Date {
      public:
        CORBA::Short _discriminator;

      public:
        struct __m {
          CORBA::String_var stringFormat;
          CORBA::Long digitalFormat;
          CORBA::Float structFormat;
        } _m;

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


        void _d( CORBA::Short _p );
        CORBA::Short _d() const;

        void stringFormat( char *_p );
        void stringFormat( const char *_p );
        void stringFormat( const CORBA::String_var &_p );
        const char *stringFormat() const;

        void digitalFormat( CORBA::Long _p );
        CORBA::Long digitalFormat() const;

        void structFormat( CORBA::Float _p );
        CORBA::Float structFormat() const;

    };

    typedef TVarVar<Date> Date_var;
    typedef Date_var Date_out;

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

// Stub for interface unions
class unions_stub:
  virtual public unions
{
  public:
    virtual ~unions_stub();
  private:
    void operator=( const unions_stub& );
};

class unions_skel :
  virtual public StaticMethodDispatcher,
  virtual public unions
{
  public:
    unions_skel( const CORBA::BOA::ReferenceData & = CORBA::BOA::ReferenceData() );
    virtual ~unions_skel();
    unions_skel( CORBA::Object_ptr obj );
    virtual bool dispatch( CORBA::StaticServerRequest_ptr _req, CORBA::Environment &_env );
    unions_ptr _this();

};

#ifndef MICO_CONF_NO_POA

#endif // MICO_CONF_NO_POA

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

extern CORBA::StaticTypeInfo *_marshaller_unions_Date;
extern CORBA::StaticTypeInfo *_marshaller_unions;
#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
