From b21fe35749f805ed18cf4097a49c4beb2674995f Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 15 Nov 2005 09:59:30 +0000 Subject: [PATCH] To document the sources --- src/OBJECT/VISU_ActorFactory.h | 13 +++++++++++ src/OBJECT/VISU_GaussPtsAct.h | 17 +++++++++++---- src/OBJECT/VISU_GaussPtsActorFactory.h | 3 +++ src/VISU_I/VISU_Prs3d_i.hh | 30 ++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/src/OBJECT/VISU_ActorFactory.h b/src/OBJECT/VISU_ActorFactory.h index d594f5b8..97cee603 100644 --- a/src/OBJECT/VISU_ActorFactory.h +++ b/src/OBJECT/VISU_ActorFactory.h @@ -36,16 +36,29 @@ class VISU_Actor; //---------------------------------------------------------------------------- namespace VISU { + //! This class defines an abstaract interface to manage actors + /*! + Actors are created by corresponding presentations and published in the defined view. + Each actor can be published only into one view but one presentation can have many actors. + Due to the complexity of the actor presentation interaction the new interface defines common + and simply way to manage them properly. + @note + This interface inherits from boost::bsignals::trackable in order to provide automatic + diconnection from defined signals if the object is destroyed. + */ struct TActorFactory: public virtual boost::bsignals::trackable { + //! Just to make this class virtual virtual ~TActorFactory() {} + //! To update the actor virtual void UpdateActor(VISU_Actor* theActor) = 0; + //! To unregister the actor virtual void RemoveActor(VISU_Actor* theActor) = 0; diff --git a/src/OBJECT/VISU_GaussPtsAct.h b/src/OBJECT/VISU_GaussPtsAct.h index 3721026b..7b9de9b4 100644 --- a/src/OBJECT/VISU_GaussPtsAct.h +++ b/src/OBJECT/VISU_GaussPtsAct.h @@ -66,10 +66,14 @@ class VISU_OutsideCursorSettings; //============================================================================ //! Base class for Gauss Points Actors. /*! - * Contains device actor (VISU_GaussPtsDeviceActor), - * which has two representation modes - outside and - * inside segmentation cursor. - */ + The actor is responsible for representation of Gauss Points. + It render corresponding presentation by usage of corresponding VISU_GaussPtsDeviceActor. + Usage of such technic of rendering gives addititional flexibility to change its behaviour in run-time. + Also, the base class implements the following functionality: + - implements a highlight and prehighlight functionality; + - defining a way to handle VISU_ImplicitFunctionWidget; + - global / local scalar bar mamangement. +*/ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor { public: @@ -274,6 +278,11 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor class VISU_GaussPtsAct2; //! Gauss Points Actor, displayed in the Base View. +/*! + * Contains device actor (VISU_GaussPtsDeviceActor), + * which has two representation modes - outside and + * inside segmentation cursor. + */ class VTKOCC_EXPORT VISU_GaussPtsAct1 : public VISU_GaussPtsAct { public: diff --git a/src/OBJECT/VISU_GaussPtsActorFactory.h b/src/OBJECT/VISU_GaussPtsActorFactory.h index 9557c60a..ba785efc 100644 --- a/src/OBJECT/VISU_GaussPtsActorFactory.h +++ b/src/OBJECT/VISU_GaussPtsActorFactory.h @@ -38,12 +38,15 @@ class VISU_GaussPtsAct2; //---------------------------------------------------------------------------- namespace VISU { + //! Extend an abstaract interface to manage Gauss points actors struct TGaussPtsActorFactory: virtual TActorFactory { + //! To create VISU_GaussPtsAct2 actor (segemented representation) from VISU_GaussPtsAct1 (basic representation) virtual VISU_GaussPtsAct2* CloneActor(VISU_GaussPtsAct1* theActor) = 0; + //! The VISU_GaussPtsAct can update its presentation virtual void UpdateFromActor(VISU_GaussPtsAct* theActor) = 0; diff --git a/src/VISU_I/VISU_Prs3d_i.hh b/src/VISU_I/VISU_Prs3d_i.hh index 4ddeca2b..a9216165 100644 --- a/src/VISU_I/VISU_Prs3d_i.hh +++ b/src/VISU_I/VISU_Prs3d_i.hh @@ -50,6 +50,16 @@ namespace VISU class Result_i; //---------------------------------------------------------------------------- + //! Base class for all VTK 3D presentations. + /*! + It is a root class for a middle level of VISU functionality. + Almost all functionality of the the class implemented through redirection + external requestes to its VISU_PipeLine. + It define an interface and implement the following topics: + - provide persistent mechanism; + - implement basic actor management (CreateActor, UpdateActor, UpdateActors, RemoveActor and RemoveActors); + - implement common 3D functionality like "clipping planes" and offset. + */ class Prs3d_i : public virtual POA_VISU::Prs3d, public virtual SALOME::GenericObj_i, @@ -62,12 +72,17 @@ namespace VISU public: //---------------------------------------------------------------------------- + //! A constructor to create a fresh instance of the class explicit Prs3d_i(Result_i* theResult, bool theAddToStudy); + + //! A constructor to restore an instance of the class explicit Prs3d_i(Result_i* theResult, SALOMEDS::SObject_ptr theSObject); + + //! To create a deep copy from another instance of the class virtual void SameAs(const Prs3d_i* theOrigin); @@ -76,26 +91,32 @@ namespace VISU ~Prs3d_i(); //---------------------------------------------------------------------------- + //! To generate an unique type name for the class (used into persistent functionality) virtual const char* GetComment() const = 0; + //! To generate an unique name for the instance of the class virtual QString GenerateName() = 0; + //! To restore paramters of the instance from Storable::TRestoringMap virtual Storable* Restore(const Storable::TRestoringMap& theMap); + //! To save paramters of the instance to std::ostringstream virtual void ToStream(std::ostringstream& theStr); //---------------------------------------------------------------------------- + //! Get corresponding Result_i Result_i* GetResult() const; + //! Get corresponding SALOMEDS::SObject virtual SALOMEDS::SObject_var GetSObject(); @@ -104,38 +125,47 @@ namespace VISU GetMeshName() const; //---------------------------------------------------------------------------- + //! To update is internal state virtual void Update(); + //! To remove the instance from study virtual void RemoveFromStudy(); //---------------------------------------------------------------------------- + //! Get corresponding VISU_PipeLine VISU_PipeLine* GetPL(); + //! Get input of the VISU_PipeLine vtkUnstructuredGrid* GetInput(); //---------------------------------------------------------------------------- + //! To define a way to create VTK representation of the instance virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL) = 0; + //! To unregister the pointed actor virtual void RemoveActor(VISU_Actor* theActor); + //! To unregister all actors of the instance virtual void RemoveActors(); + //! To update the pointed actor virtual void UpdateActor(VISU_Actor* theActor); + //! To update all actors of the instance virtual void UpdateActors(); -- 2.39.2