1 // Created on: 2014-08-15
2 // Created by: Varvara POSKONINA
3 // Copyright (c) 2005-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <SelectMgr_SensitiveEntity.hxx>
19 IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_SensitiveEntity,Standard_Transient)
21 //=======================================================================
22 // function : SelectMgr_SensitiveEntity
23 // purpose : Creates new inactive for selection object with base entity
25 //=======================================================================
26 SelectMgr_SensitiveEntity::SelectMgr_SensitiveEntity (const Handle(SelectBasics_SensitiveEntity)& theEntity)
28 mySensitive = theEntity;
29 myIsActiveForSelection = Standard_False;
32 //=======================================================================
34 // purpose : Clears up all the resources and memory
35 //=======================================================================
36 void SelectMgr_SensitiveEntity::Clear()
39 mySensitive.Nullify();
42 //=======================================================================
43 // function : BaseSensitive
44 // purpose : Returns related instance of SelectBasics class
45 //=======================================================================
46 const Handle(SelectBasics_SensitiveEntity)& SelectMgr_SensitiveEntity::BaseSensitive() const
51 //=======================================================================
52 // function : IsActiveForSelection
53 // purpose : Returns true if this entity belongs to the active selection
54 // mode of parent object
55 //=======================================================================
56 Standard_Boolean SelectMgr_SensitiveEntity::IsActiveForSelection() const
58 return myIsActiveForSelection;
61 //=======================================================================
62 // function : ResetSelectionActiveStatus
63 // purpose : Marks entity as inactive for selection
64 //=======================================================================
65 void SelectMgr_SensitiveEntity::ResetSelectionActiveStatus() const
67 myIsActiveForSelection = Standard_False;
70 //=======================================================================
71 // function : SetActiveForSelection
72 // purpose : Marks entity as active for selection
73 //=======================================================================
74 void SelectMgr_SensitiveEntity::SetActiveForSelection() const
76 myIsActiveForSelection = Standard_True;