2004-06-18 14:34:31 +06:00
|
|
|
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
|
|
|
|
//
|
|
|
|
// Copyright (C) 2004 CEA
|
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2.1 of the License.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
//
|
2006-06-01 17:39:17 +06:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
2004-06-18 14:34:31 +06:00
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// File : SMESH_Group_i.hxx
|
|
|
|
// Author : Sergey ANIKIN, OCC
|
|
|
|
// Module : SMESH
|
|
|
|
// $Header$
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
#ifndef SMESH_Group_i_HeaderFile
|
|
|
|
#define SMESH_Group_i_HeaderFile
|
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
#include "SMESH.hxx"
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
#include <SALOMEconfig.h>
|
|
|
|
#include CORBA_SERVER_HEADER(SMESH_Group)
|
|
|
|
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
2004-12-01 15:48:31 +05:00
|
|
|
#include CORBA_CLIENT_HEADER(GEOM_Gen)
|
2004-06-18 14:34:31 +06:00
|
|
|
|
|
|
|
#include "SALOME_GenericObj_i.hh"
|
|
|
|
|
|
|
|
class SMESH_Mesh_i;
|
2005-06-07 19:22:20 +06:00
|
|
|
class SMESH_Group;
|
2004-12-01 15:48:31 +05:00
|
|
|
class SMESHDS_GroupBase;
|
|
|
|
|
|
|
|
// ===========
|
|
|
|
// Group Base
|
|
|
|
// ===========
|
2008-03-07 12:47:05 +05:00
|
|
|
class SMESH_I_EXPORT SMESH_GroupBase_i:
|
2004-12-01 15:48:31 +05:00
|
|
|
public virtual POA_SMESH::SMESH_GroupBase,
|
2004-06-18 14:34:31 +06:00
|
|
|
public virtual SALOME::GenericObj_i
|
|
|
|
{
|
2004-12-01 15:48:31 +05:00
|
|
|
public:
|
|
|
|
SMESH_GroupBase_i(PortableServer::POA_ptr thePOA,
|
|
|
|
SMESH_Mesh_i* theMeshServant,
|
|
|
|
const int theLocalID );
|
|
|
|
virtual ~SMESH_GroupBase_i();
|
2004-06-18 14:34:31 +06:00
|
|
|
|
|
|
|
// CORBA interface implementation
|
2004-12-01 15:48:31 +05:00
|
|
|
void SetName(const char* name);
|
2004-06-18 14:34:31 +06:00
|
|
|
char* GetName();
|
|
|
|
SMESH::ElementType GetType();
|
|
|
|
CORBA::Long Size();
|
|
|
|
CORBA::Boolean IsEmpty();
|
2004-12-01 15:48:31 +05:00
|
|
|
CORBA::Boolean Contains(CORBA::Long elem_id);
|
|
|
|
CORBA::Long GetID(CORBA::Long elem_index);
|
|
|
|
SMESH::long_array* GetListOfID();
|
|
|
|
SMESH::SMESH_Mesh_ptr GetMesh();
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
// Inherited from SMESH_IDSource interface
|
|
|
|
virtual SMESH::long_array* GetIDs();
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
// Internal C++ interface
|
|
|
|
int GetLocalID() const { return myLocalID; }
|
|
|
|
SMESH_Mesh_i* GetMeshServant() const { return myMeshServant; }
|
2005-06-07 19:22:20 +06:00
|
|
|
SMESH_Group* GetSmeshGroup() const;
|
2004-12-01 15:48:31 +05:00
|
|
|
SMESHDS_GroupBase* GetGroupDS() const;
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
void SetColor(const SALOMEDS::Color& color);
|
|
|
|
SALOMEDS::Color GetColor();
|
|
|
|
|
|
|
|
void SetColorNumber(CORBA::Long color);
|
|
|
|
CORBA::Long GetColorNumber();
|
2006-03-13 20:29:49 +05:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
private:
|
|
|
|
SMESH_Mesh_i* myMeshServant;
|
|
|
|
int myLocalID;
|
|
|
|
};
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
// ======
|
|
|
|
// Group
|
|
|
|
// ======
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
class SMESH_I_EXPORT SMESH_Group_i:
|
2004-12-01 15:48:31 +05:00
|
|
|
public virtual POA_SMESH::SMESH_Group,
|
2005-02-02 16:09:27 +05:00
|
|
|
public SMESH_GroupBase_i
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SMESH_Group_i( PortableServer::POA_ptr thePOA, SMESH_Mesh_i* theMeshServant, const int theLocalID );
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
// CORBA interface implementation
|
|
|
|
void Clear();
|
|
|
|
CORBA::Long Add( const SMESH::long_array& theIDs );
|
2004-06-18 14:34:31 +06:00
|
|
|
CORBA::Long Remove( const SMESH::long_array& theIDs );
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
CORBA::Long AddByPredicate( SMESH::Predicate_ptr thePredicate );
|
|
|
|
CORBA::Long RemoveByPredicate( SMESH::Predicate_ptr thePredicate );
|
2004-12-01 15:48:31 +05:00
|
|
|
};
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
// =========================
|
|
|
|
// Group linked to geometry
|
|
|
|
// =========================
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
class SMESH_I_EXPORT SMESH_GroupOnGeom_i:
|
2004-12-01 15:48:31 +05:00
|
|
|
public virtual POA_SMESH::SMESH_GroupOnGeom,
|
2005-02-02 16:09:27 +05:00
|
|
|
public SMESH_GroupBase_i
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SMESH_GroupOnGeom_i( PortableServer::POA_ptr thePOA, SMESH_Mesh_i* theMeshServant, const int theLocalID );
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
// CORBA interface implementation
|
|
|
|
GEOM::GEOM_Object_ptr GetShape();
|
2004-06-18 14:34:31 +06:00
|
|
|
};
|
|
|
|
#endif
|