X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVISU_I%2FVISU_Mesh_i.hh;h=de7e3142660d62f0fd47ed31a684b73826208a87;hb=d90eeb25287fa1f390fe7a336547e74161708e44;hp=51668a8344cac0ef168f752ae84bf20c19c17508;hpb=17b175ff4b710fc93421509ffa7583edd1678a5d;p=modules%2Fvisu.git diff --git a/src/VISU_I/VISU_Mesh_i.hh b/src/VISU_I/VISU_Mesh_i.hh index 51668a83..de7e3142 100644 --- a/src/VISU_I/VISU_Mesh_i.hh +++ b/src/VISU_I/VISU_Mesh_i.hh @@ -1,29 +1,29 @@ -// VISU OBJECT : interactive object for VISU entities implementation +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// 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 // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// VISU OBJECT : interactive object for VISU entities implementation // File : VISU_PrsObject_i.hxx // Author : Alexey PETROV // Module : VISU - +// #ifndef VISU_Mesh_i_HeaderFile #define VISU_Mesh_i_HeaderFile @@ -31,74 +31,161 @@ class VISU_MeshPL; -namespace VISU{ - class Mesh_i : public virtual POA_VISU::Mesh, +namespace VISU +{ + class VISU_I_EXPORT Mesh_i : public virtual POA_VISU::Mesh, public virtual Prs3d_i { static int myNbPresent; - Mesh_i(); Mesh_i(const Mesh_i&); + public: - Mesh_i(Result_i* theResult); - virtual void SameAs(const Mesh_i* theOrigin); - virtual ~Mesh_i(); - virtual void Destroy(); + typedef Prs3d_i TSuperClass; + typedef VISU::Mesh TInterface; - virtual VISU::VISUType GetType() { return VISU::TMESH;}; + Mesh_i(); - virtual void SetCellColor(const SALOMEDS::Color& theColor) { myCellColor = theColor;} - virtual SALOMEDS::Color GetCellColor() { return myCellColor;} + virtual + ~Mesh_i(); - virtual void SetNodeColor(const SALOMEDS::Color& theColor) { myNodeColor = theColor;} - virtual SALOMEDS::Color GetNodeColor() { return myNodeColor;} + virtual + void + SameAs(const Prs3d_i* theOrigin); - virtual void SetLinkColor(const SALOMEDS::Color& theColor) { myLinkColor = theColor;} - virtual SALOMEDS::Color GetLinkColor() { return myLinkColor;} + virtual + void + RemoveFromStudy(); - virtual void SetPresentationType(VISU::PresentationType theType) { myPresentType = theType;} - virtual PresentationType GetPresentationType() { return myPresentType;} + virtual + VISU::VISUType + GetType() + { + return VISU::TMESH; + } - typedef VISU::Mesh TInterface; - VISU_MeshPL* GetMeshPL(){ return myMeshPL;} + virtual + void + SetCellColor(const SALOMEDS::Color& theColor); + + virtual + SALOMEDS::Color + GetCellColor(); + + virtual + void + SetNodeColor(const SALOMEDS::Color& theColor); + + virtual + SALOMEDS::Color + GetNodeColor(); + + virtual + void + SetLinkColor(const SALOMEDS::Color& theColor); + + virtual + SALOMEDS::Color + GetLinkColor(); + + virtual + void + SetPresentationType(VISU::PresentationType theType); + + virtual + VISU::PresentationType + GetPresentationType(); + + + virtual void SetShrink(CORBA::Boolean toShrink); + + virtual CORBA::Boolean IsShrank(); + + VISU_MeshPL* GetSpecificPL() const + { + return myMeshPL; + } protected: - Storable* Build(int theRestoring); + Storable* + Build(int theRestoring); VISU_MeshPL* myMeshPL; - string myMeshName; - TEntity myEntity; - string mySubMeshName; + int myEntity;//jfa IPAL9284: TEntity myEntity; + std::string mySubMeshName; VISU::VISUType myType; VISU::PresentationType myPresentType; - struct SALOMEDS::Color myCellColor, myNodeColor, myLinkColor; + SALOMEDS::Color myCellColor; + SALOMEDS::Color myNodeColor; + SALOMEDS::Color myLinkColor; + bool myIsShrank; public: - static int IsPossible(Result_i* theResult, const char* theMeshName, Entity theEntity, const char* theFamilyName = ""); - virtual Storable* Create(const char* theMeshName, Entity theEntity, const char* theFamilyName = ""); + static + size_t + IsPossible(VISU::Result_i* theResult, + const std::string& theMeshName, + VISU::Entity theEntity, + const std::string& theFamilyName = ""); + virtual + Storable* + Create(VISU::Result_i* theResult, + const std::string& theMeshName, + VISU::Entity theEntity, + const std::string& theFamilyName = ""); + + static + size_t + IsPossible(VISU::Result_i* theResult, + const std::string& theMeshName, + const std::string& theGroupName); + virtual + Storable* + Create(VISU::Result_i* theResult, + const std::string& theMeshName, + const std::string& theGroupName); + + VISU::Entity + GetEntity() const; + + const std::string& + GetSubMeshName() const; + + virtual + void + ToStream(std::ostringstream& theStr); + + virtual + const char* + GetComment() const; + + static const std::string myComment; + + virtual + QString + GenerateName(); + + virtual + Storable* + Restore(SALOMEDS::SObject_ptr theSObject, + const Storable::TRestoringMap& theMap); + + static + Storable* + StorableEngine(SALOMEDS::SObject_ptr theSObject, + const Storable::TRestoringMap& theMap, + const std::string& thePrefix, + CORBA::Boolean theIsMultiFile); - static int IsPossible(Result_i* theResult, const char* theMeshName, const char* theGroupName); - virtual Storable* Create(const char* theMeshName, const char* theGroupName); - - virtual void ToStream(std::ostringstream& theStr); - - virtual const char* GetComment() const; - static const string myComment; - virtual QString GenerateName(); + virtual + VISU_Actor* + CreateActor(); - virtual Storable* Restore(const Storable::TRestoringMap& theMap) - throw(std::logic_error&); - static Storable* Restore(SALOMEDS::SObject_ptr theSObject, - const string& thePrefix, const Storable::TRestoringMap& theMap) - throw(std::logic_error&); - - virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL) - throw (std::runtime_error&); - virtual void UpdateActor(VISU_Actor* theActor); + virtual + void + UpdateActor(VISU_ActorBase* theActor); }; } #endif - -