// This file is generated by omniidl (C++ backend)- omniORB_4_1. Do not edit.
#ifndef __SALOME__Exception_hh__
#define __SALOME__Exception_hh__

#ifndef __CORBA_H_EXTERNAL_GUARD__
#include <omniORB4/CORBA.h>
#endif

#ifndef  USE_stub_in_nt_dll
# define USE_stub_in_nt_dll_NOT_DEFINED_SALOME__Exception
#endif
#ifndef  USE_core_stub_in_nt_dll
# define USE_core_stub_in_nt_dll_NOT_DEFINED_SALOME__Exception
#endif
#ifndef  USE_dyn_stub_in_nt_dll
# define USE_dyn_stub_in_nt_dll_NOT_DEFINED_SALOME__Exception
#endif






#ifdef USE_stub_in_nt_dll
# ifndef USE_core_stub_in_nt_dll
#  define USE_core_stub_in_nt_dll
# endif
# ifndef USE_dyn_stub_in_nt_dll
#  define USE_dyn_stub_in_nt_dll
# endif
#endif

#ifdef _core_attr
# error "A local CPP macro _core_attr has already been defined."
#else
# ifdef  USE_core_stub_in_nt_dll
#  define _core_attr _OMNIORB_NTDLL_IMPORT
# else
#  define _core_attr
# endif
#endif

#ifdef _dyn_attr
# error "A local CPP macro _dyn_attr has already been defined."
#else
# ifdef  USE_dyn_stub_in_nt_dll
#  define _dyn_attr _OMNIORB_NTDLL_IMPORT
# else
#  define _dyn_attr
# endif
#endif





_CORBA_MODULE SALOME

_CORBA_MODULE_BEG

  enum ExceptionType { COMM, BAD_PARAM, INTERNAL_ERROR /*, __max_ExceptionType=0xffffffff */ };
  typedef ExceptionType& ExceptionType_out;

  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_ExceptionType;

  struct ExceptionStruct {
    typedef _CORBA_ConstrType_Variable_Var<ExceptionStruct> _var_type;

    
    ExceptionType type;

    ::CORBA::String_member text;

    ::CORBA::String_member sourceFile;

    ::CORBA::ULong lineNumber;

  

    void operator>>= (cdrStream &) const;
    void operator<<= (cdrStream &);
  };

  typedef ExceptionStruct::_var_type ExceptionStruct_var;

  typedef _CORBA_ConstrType_Variable_OUT_arg< ExceptionStruct,ExceptionStruct_var > ExceptionStruct_out;

  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_ExceptionStruct;

  class SALOME_Exception : public ::CORBA::UserException {
  public:
    
    ExceptionStruct details;

  

    inline SALOME_Exception() {
      pd_insertToAnyFn    = insertToAnyFn;
      pd_insertToAnyFnNCP = insertToAnyFnNCP;
    }
    SALOME_Exception(const SALOME_Exception&);
    SALOME_Exception(const ExceptionStruct& i_details);
    SALOME_Exception& operator=(const SALOME_Exception&);
    virtual ~SALOME_Exception();
    virtual void _raise() const;
    static SALOME_Exception* _downcast(::CORBA::Exception*);
    static const SALOME_Exception* _downcast(const ::CORBA::Exception*);
    static inline SALOME_Exception* _narrow(::CORBA::Exception* _e) {
      return _downcast(_e);
    }
    
    void operator>>=(cdrStream&) const ;
    void operator<<=(cdrStream&) ;

    static _core_attr insertExceptionToAny    insertToAnyFn;
    static _core_attr insertExceptionToAnyNCP insertToAnyFnNCP;

    virtual ::CORBA::Exception* _NP_duplicate() const;

    static _core_attr const char* _PD_repoId;
    static _core_attr const char* _PD_typeId;

  private:
    virtual const char* _NP_typeId() const;
    virtual const char* _NP_repoId(int*) const;
    virtual void _NP_marshal(cdrStream&) const;
  };

  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_SALOME_Exception;

_CORBA_MODULE_END



_CORBA_MODULE POA_SALOME
_CORBA_MODULE_BEG

_CORBA_MODULE_END



_CORBA_MODULE OBV_SALOME
_CORBA_MODULE_BEG

_CORBA_MODULE_END





#undef _core_attr
#undef _dyn_attr

inline void operator >>=(SALOME::ExceptionType _e, cdrStream& s) {
  ::operator>>=((::CORBA::ULong)_e, s);
}

inline void operator <<= (SALOME::ExceptionType& _e, cdrStream& s) {
  ::CORBA::ULong _0RL_e;
  ::operator<<=(_0RL_e,s);
  if (_0RL_e <= SALOME::INTERNAL_ERROR) {
    _e = (SALOME::ExceptionType) _0RL_e;
  }
  else {
    OMNIORB_THROW(MARSHAL,_OMNI_NS(MARSHAL_InvalidEnumValue),
                  (::CORBA::CompletionStatus)s.completion());
  }
}

void operator<<=(::CORBA::Any& _a, SALOME::ExceptionType _s);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, SALOME::ExceptionType& _s);

extern void operator<<=(::CORBA::Any& _a, const SALOME::ExceptionStruct& _s);
extern void operator<<=(::CORBA::Any& _a, SALOME::ExceptionStruct* _sp);
extern _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, SALOME::ExceptionStruct*& _sp);
extern _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, const SALOME::ExceptionStruct*& _sp);

void operator<<=(::CORBA::Any& _a, const SALOME::SALOME_Exception& _s);
void operator<<=(::CORBA::Any& _a, const SALOME::SALOME_Exception* _sp);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, const SALOME::SALOME_Exception*& _sp);





#ifdef   USE_stub_in_nt_dll_NOT_DEFINED_SALOME__Exception
# undef  USE_stub_in_nt_dll
# undef  USE_stub_in_nt_dll_NOT_DEFINED_SALOME__Exception
#endif
#ifdef   USE_core_stub_in_nt_dll_NOT_DEFINED_SALOME__Exception
# undef  USE_core_stub_in_nt_dll
# undef  USE_core_stub_in_nt_dll_NOT_DEFINED_SALOME__Exception
#endif
#ifdef   USE_dyn_stub_in_nt_dll_NOT_DEFINED_SALOME__Exception
# undef  USE_dyn_stub_in_nt_dll
# undef  USE_dyn_stub_in_nt_dll_NOT_DEFINED_SALOME__Exception
#endif

#endif  // __SALOME__Exception_hh__

