// This file is generated by omniidl (C++ backend)- omniORB_4_1. Do not edit.
#ifndef __SMESH__Pattern_hh__
#define __SMESH__Pattern_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_SMESH__Pattern
#endif
#ifndef  USE_core_stub_in_nt_dll
# define USE_core_stub_in_nt_dll_NOT_DEFINED_SMESH__Pattern
#endif
#ifndef  USE_dyn_stub_in_nt_dll
# define USE_dyn_stub_in_nt_dll_NOT_DEFINED_SMESH__Pattern
#endif



#ifndef __SALOME__Exception_hh_EXTERNAL_GUARD__
#define __SALOME__Exception_hh_EXTERNAL_GUARD__
#include <SALOME_Exception.hh>
#endif
#ifndef __SALOME__GenericObj_hh_EXTERNAL_GUARD__
#define __SALOME__GenericObj_hh_EXTERNAL_GUARD__
#include <SALOME_GenericObj.hh>
#endif
#ifndef __SALOMEDS_hh_EXTERNAL_GUARD__
#define __SALOMEDS_hh_EXTERNAL_GUARD__
#include <SALOMEDS.hh>
#endif
#ifndef __SALOME__PyNode_hh_EXTERNAL_GUARD__
#define __SALOME__PyNode_hh_EXTERNAL_GUARD__
#include <SALOME_PyNode.hh>
#endif
#ifndef __SALOME__Component_hh_EXTERNAL_GUARD__
#define __SALOME__Component_hh_EXTERNAL_GUARD__
#include <SALOME_Component.hh>
#endif
#ifndef __SALOMEDS__Attributes_hh_EXTERNAL_GUARD__
#define __SALOMEDS__Attributes_hh_EXTERNAL_GUARD__
#include <SALOMEDS_Attributes.hh>
#endif
#ifndef __GEOM__Gen_hh_EXTERNAL_GUARD__
#define __GEOM__Gen_hh_EXTERNAL_GUARD__
#include <GEOM_Gen.hh>
#endif
#ifndef __SALOME__Comm_hh_EXTERNAL_GUARD__
#define __SALOME__Comm_hh_EXTERNAL_GUARD__
#include <SALOME_Comm.hh>
#endif
#ifndef __MED_hh_EXTERNAL_GUARD__
#define __MED_hh_EXTERNAL_GUARD__
#include <MED.hh>
#endif
#ifndef __SMESH__Mesh_hh_EXTERNAL_GUARD__
#define __SMESH__Mesh_hh_EXTERNAL_GUARD__
#include <SMESH_Mesh.hh>
#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 SMESH

_CORBA_MODULE_BEG

  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_point_array;

  class point_array_var;

  class point_array : public _CORBA_Unbounded_Sequence< PointStruct >  {
  public:
    typedef point_array_var _var_type;
    inline point_array() {}
    inline point_array(const point_array& _s)
      : _CORBA_Unbounded_Sequence< PointStruct > (_s) {}

    inline point_array(_CORBA_ULong _max)
      : _CORBA_Unbounded_Sequence< PointStruct > (_max) {}
    inline point_array(_CORBA_ULong _max, _CORBA_ULong _len, PointStruct* _val, _CORBA_Boolean _rel=0)
      : _CORBA_Unbounded_Sequence< PointStruct > (_max, _len, _val, _rel) {}

  

    inline point_array& operator = (const point_array& _s) {
      _CORBA_Unbounded_Sequence< PointStruct > ::operator=(_s);
      return *this;
    }
  };

  class point_array_out;

  class point_array_var {
  public:
    inline point_array_var() : _pd_seq(0) {}
    inline point_array_var(point_array* _s) : _pd_seq(_s) {}
    inline point_array_var(const point_array_var& _s) {
      if( _s._pd_seq )  _pd_seq = new point_array(*_s._pd_seq);
      else              _pd_seq = 0;
    }
    inline ~point_array_var() { if( _pd_seq )  delete _pd_seq; }
      
    inline point_array_var& operator = (point_array* _s) {
      if( _pd_seq )  delete _pd_seq;
      _pd_seq = _s;
      return *this;
    }
    inline point_array_var& operator = (const point_array_var& _s) {
      if( _s._pd_seq ) {
        if( !_pd_seq )  _pd_seq = new point_array;
        *_pd_seq = *_s._pd_seq;
      } else if( _pd_seq ) {
        delete _pd_seq;
        _pd_seq = 0;
      }
      return *this;
    }
    inline PointStruct& operator [] (_CORBA_ULong _s) {
      return (*_pd_seq)[_s];
    }

  

    inline point_array* operator -> () { return _pd_seq; }
    inline const point_array* operator -> () const { return _pd_seq; }
#if defined(__GNUG__)
    inline operator point_array& () const { return *_pd_seq; }
#else
    inline operator const point_array& () const { return *_pd_seq; }
    inline operator point_array& () { return *_pd_seq; }
#endif
      
    inline const point_array& in() const { return *_pd_seq; }
    inline point_array&       inout()    { return *_pd_seq; }
    inline point_array*&      out() {
      if( _pd_seq ) { delete _pd_seq; _pd_seq = 0; }
      return _pd_seq;
    }
    inline point_array* _retn() { point_array* tmp = _pd_seq; _pd_seq = 0; return tmp; }
      
    friend class point_array_out;
    
  private:
    point_array* _pd_seq;
  };

  class point_array_out {
  public:
    inline point_array_out(point_array*& _s) : _data(_s) { _data = 0; }
    inline point_array_out(point_array_var& _s)
      : _data(_s._pd_seq) { _s = (point_array*) 0; }
    inline point_array_out(const point_array_out& _s) : _data(_s._data) {}
    inline point_array_out& operator = (const point_array_out& _s) {
      _data = _s._data;
      return *this;
    }
    inline point_array_out& operator = (point_array* _s) {
      _data = _s;
      return *this;
    }
    inline operator point_array*&()  { return _data; }
    inline point_array*& ptr()       { return _data; }
    inline point_array* operator->() { return _data; }

    inline PointStruct& operator [] (_CORBA_ULong _i) {
      return (*_data)[_i];
    }

  

    point_array*& _data;

  private:
    point_array_out();
    point_array_out& operator=(const point_array_var&);
  };

#ifndef __SMESH_mSMESH__Pattern__
#define __SMESH_mSMESH__Pattern__

  class SMESH_Pattern;
  class _objref_SMESH_Pattern;
  class _impl_SMESH_Pattern;
  
  typedef _objref_SMESH_Pattern* SMESH_Pattern_ptr;
  typedef SMESH_Pattern_ptr SMESH_PatternRef;

  class SMESH_Pattern_Helper {
  public:
    typedef SMESH_Pattern_ptr _ptr_type;

    static _ptr_type _nil();
    static _CORBA_Boolean is_nil(_ptr_type);
    static void release(_ptr_type);
    static void duplicate(_ptr_type);
    static void marshalObjRef(_ptr_type, cdrStream&);
    static _ptr_type unmarshalObjRef(cdrStream&);
  };

  typedef _CORBA_ObjRef_Var<_objref_SMESH_Pattern, SMESH_Pattern_Helper> SMESH_Pattern_var;
  typedef _CORBA_ObjRef_OUT_arg<_objref_SMESH_Pattern,SMESH_Pattern_Helper > SMESH_Pattern_out;

#endif

  // interface SMESH_Pattern
  class SMESH_Pattern {
  public:
    // Declarations for this interface type.
    typedef SMESH_Pattern_ptr _ptr_type;
    typedef SMESH_Pattern_var _var_type;

    static _ptr_type _duplicate(_ptr_type);
    static _ptr_type _narrow(::CORBA::Object_ptr);
    static _ptr_type _unchecked_narrow(::CORBA::Object_ptr);
    
    static _ptr_type _nil();

    static inline void _marshalObjRef(_ptr_type, cdrStream&);

    static inline _ptr_type _unmarshalObjRef(cdrStream& s) {
      omniObjRef* o = omniObjRef::_unMarshal(_PD_repoId,s);
      if (o)
        return (_ptr_type) o->_ptrToObjRef(_PD_repoId);
      else
        return _nil();
    }

    static _core_attr const char* _PD_repoId;

    // Other IDL defined within this scope.
    enum ErrorCode { ERR_OK, ERR_READ_NB_POINTS, ERR_READ_POINT_COORDS, ERR_READ_TOO_FEW_POINTS, ERR_READ_3D_COORD, ERR_READ_NO_KEYPOINT, ERR_READ_BAD_INDEX, ERR_READ_ELEM_POINTS, ERR_READ_NO_ELEMS, ERR_READ_BAD_KEY_POINT, ERR_SAVE_NOT_LOADED, ERR_LOAD_EMPTY_SUBMESH, ERR_LOADF_NARROW_FACE, ERR_LOADF_CLOSED_FACE, ERR_LOADF_CANT_PROJECT, ERR_LOADV_BAD_SHAPE, ERR_LOADV_COMPUTE_PARAMS, ERR_APPL_NOT_LOADED, ERR_APPL_BAD_DIMENTION, ERR_APPL_BAD_NB_VERTICES, ERR_APPLF_BAD_TOPOLOGY, ERR_APPLF_BAD_VERTEX, ERR_APPLF_INTERNAL_EEROR, ERR_APPLV_BAD_SHAPE, ERR_MAKEM_NOT_COMPUTED /*, __max_ErrorCode=0xffffffff */ };
    typedef ErrorCode& ErrorCode_out;

    static _dyn_attr const ::CORBA::TypeCode_ptr _tc_ErrorCode;

  
  };

  class _objref_SMESH_Pattern :
    public virtual ::CORBA::Object,
    public virtual omniObjRef
  {
  public:
    ::CORBA::Boolean LoadFromFile(const char* theFileContents);
    ::CORBA::Boolean LoadFromFace(::SMESH::SMESH_Mesh_ptr theMesh, ::GEOM::GEOM_Object_ptr theFace, ::CORBA::Boolean theProject);
    ::CORBA::Boolean LoadFrom3DBlock(::SMESH::SMESH_Mesh_ptr theMesh, ::GEOM::GEOM_Object_ptr theBlock);
    point_array* ApplyToFace(::GEOM::GEOM_Object_ptr theFace, ::GEOM::GEOM_Object_ptr theVertexOnKeyPoint1, ::CORBA::Boolean theReverse);
    point_array* ApplyTo3DBlock(::GEOM::GEOM_Object_ptr theBlock, ::GEOM::GEOM_Object_ptr theVertex000, ::GEOM::GEOM_Object_ptr theVertex001);
    point_array* ApplyToMeshFaces(::SMESH::SMESH_Mesh_ptr theMesh, const ::SMESH::long_array& theFacesIDs, ::CORBA::Long theNodeIndexOnKeyPoint1, ::CORBA::Boolean theReverse);
    point_array* ApplyToHexahedrons(::SMESH::SMESH_Mesh_ptr theMesh, const ::SMESH::long_array& theVolumesIDs, ::CORBA::Long theNode000Index, ::CORBA::Long theNode001Index);
    ::CORBA::Boolean MakeMesh(::SMESH::SMESH_Mesh_ptr theMesh, ::CORBA::Boolean CreatePolygons, ::CORBA::Boolean CreatePolyedrs);
    char* GetString();
    SMESH_Pattern::ErrorCode GetErrorCode();
    ::CORBA::Boolean Is2D();
    point_array* GetPoints();
    long_array* GetKeyPoints();
    array_of_long_array* GetElementPoints(::CORBA::Boolean all);

    inline _objref_SMESH_Pattern()  { _PR_setobj(0); }  // nil
    _objref_SMESH_Pattern(omniIOR*, omniIdentity*);

  protected:
    virtual ~_objref_SMESH_Pattern();

    
  private:
    virtual void* _ptrToObjRef(const char*);

    _objref_SMESH_Pattern(const _objref_SMESH_Pattern&);
    _objref_SMESH_Pattern& operator = (const _objref_SMESH_Pattern&);
    // not implemented

    friend class SMESH_Pattern;
  };

  class _pof_SMESH_Pattern : public _OMNI_NS(proxyObjectFactory) {
  public:
    inline _pof_SMESH_Pattern() : _OMNI_NS(proxyObjectFactory)(SMESH_Pattern::_PD_repoId) {}
    virtual ~_pof_SMESH_Pattern();

    virtual omniObjRef* newObjRef(omniIOR*,omniIdentity*);
    virtual _CORBA_Boolean is_a(const char*) const;
  };

  class _impl_SMESH_Pattern :
    public virtual omniServant
  {
  public:
    virtual ~_impl_SMESH_Pattern();

    virtual ::CORBA::Boolean LoadFromFile(const char* theFileContents) = 0;
    virtual ::CORBA::Boolean LoadFromFace(::SMESH::SMESH_Mesh_ptr theMesh, ::GEOM::GEOM_Object_ptr theFace, ::CORBA::Boolean theProject) = 0;
    virtual ::CORBA::Boolean LoadFrom3DBlock(::SMESH::SMESH_Mesh_ptr theMesh, ::GEOM::GEOM_Object_ptr theBlock) = 0;
    virtual point_array* ApplyToFace(::GEOM::GEOM_Object_ptr theFace, ::GEOM::GEOM_Object_ptr theVertexOnKeyPoint1, ::CORBA::Boolean theReverse) = 0;
    virtual point_array* ApplyTo3DBlock(::GEOM::GEOM_Object_ptr theBlock, ::GEOM::GEOM_Object_ptr theVertex000, ::GEOM::GEOM_Object_ptr theVertex001) = 0;
    virtual point_array* ApplyToMeshFaces(::SMESH::SMESH_Mesh_ptr theMesh, const ::SMESH::long_array& theFacesIDs, ::CORBA::Long theNodeIndexOnKeyPoint1, ::CORBA::Boolean theReverse) = 0;
    virtual point_array* ApplyToHexahedrons(::SMESH::SMESH_Mesh_ptr theMesh, const ::SMESH::long_array& theVolumesIDs, ::CORBA::Long theNode000Index, ::CORBA::Long theNode001Index) = 0;
    virtual ::CORBA::Boolean MakeMesh(::SMESH::SMESH_Mesh_ptr theMesh, ::CORBA::Boolean CreatePolygons, ::CORBA::Boolean CreatePolyedrs) = 0;
    virtual char* GetString() = 0;
    virtual SMESH_Pattern::ErrorCode GetErrorCode() = 0;
    virtual ::CORBA::Boolean Is2D() = 0;
    virtual point_array* GetPoints() = 0;
    virtual long_array* GetKeyPoints() = 0;
    virtual array_of_long_array* GetElementPoints(::CORBA::Boolean all) = 0;
    
  public:  // Really protected, workaround for xlC
    virtual _CORBA_Boolean _dispatch(omniCallHandle&);

  private:
    virtual void* _ptrToInterface(const char*);
    virtual const char* _mostDerivedRepoId();
    
  };


  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_SMESH_Pattern;

_CORBA_MODULE_END



_CORBA_MODULE POA_SMESH
_CORBA_MODULE_BEG

  class SMESH_Pattern :
    public virtual SMESH::_impl_SMESH_Pattern,
    public virtual ::PortableServer::ServantBase
  {
  public:
    virtual ~SMESH_Pattern();

    inline ::SMESH::SMESH_Pattern_ptr _this() {
      return (::SMESH::SMESH_Pattern_ptr) _do_this(::SMESH::SMESH_Pattern::_PD_repoId);
    }
  };

_CORBA_MODULE_END



_CORBA_MODULE OBV_SMESH
_CORBA_MODULE_BEG

_CORBA_MODULE_END





#undef _core_attr
#undef _dyn_attr

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

inline void operator >>=(SMESH::SMESH_Pattern::ErrorCode _e, cdrStream& s) {
  ::operator>>=((::CORBA::ULong)_e, s);
}

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

void operator<<=(::CORBA::Any& _a, SMESH::SMESH_Pattern::ErrorCode _s);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, SMESH::SMESH_Pattern::ErrorCode& _s);

void operator<<=(::CORBA::Any& _a, SMESH::SMESH_Pattern_ptr _s);
void operator<<=(::CORBA::Any& _a, SMESH::SMESH_Pattern_ptr* _s);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, SMESH::SMESH_Pattern_ptr& _s);



inline void
SMESH::SMESH_Pattern::_marshalObjRef(::SMESH::SMESH_Pattern_ptr obj, cdrStream& s) {
  omniObjRef::_marshal(obj->_PR_getobj(),s);
}




#ifdef   USE_stub_in_nt_dll_NOT_DEFINED_SMESH__Pattern
# undef  USE_stub_in_nt_dll
# undef  USE_stub_in_nt_dll_NOT_DEFINED_SMESH__Pattern
#endif
#ifdef   USE_core_stub_in_nt_dll_NOT_DEFINED_SMESH__Pattern
# undef  USE_core_stub_in_nt_dll
# undef  USE_core_stub_in_nt_dll_NOT_DEFINED_SMESH__Pattern
#endif
#ifdef   USE_dyn_stub_in_nt_dll_NOT_DEFINED_SMESH__Pattern
# undef  USE_dyn_stub_in_nt_dll
# undef  USE_dyn_stub_in_nt_dll_NOT_DEFINED_SMESH__Pattern
#endif

#endif  // __SMESH__Pattern_hh__

