0024947: Redesign OCCT legacy type system -- automatic
[occt.git] / src / SelectMgr / SelectMgr_SensitiveEntity.hxx
CommitLineData
f751596e 1// Created on: 2014-08-15
2// Created by: Varvara POSKONINA
3// Copyright (c) 2005-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
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.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _SelectMgr_SensitiveEntity_HeaderFile
17#define _SelectMgr_SensitiveEntity_HeaderFile
18
19#include <SelectBasics_SensitiveEntity.hxx>
20#include <Handle_SelectBasics_SensitiveEntity.hxx>
7ab15952 21#include <Standard.hxx>
ec357c5c 22#include <Standard_Type.hxx>
f751596e 23
24//! The purpose of this class is to mark sensitive entities selectable or not
25//! depending on current active selection of parent object for proper BVH traverse
7ab15952 26class SelectMgr_SensitiveEntity : public Standard_Transient
f751596e 27{
28public:
29
30 //! Creates new inactive for selection object with base entity theEntity
31 SelectMgr_SensitiveEntity (const Handle(SelectBasics_SensitiveEntity)& theEntity);
32
33 ~SelectMgr_SensitiveEntity() {}
34
35 //! Clears up all resources and memory
36 void Clear();
37
38 //! Returns related instance of SelectBasics class
39 Standard_EXPORT const Handle(SelectBasics_SensitiveEntity)& BaseSensitive() const;
40
41 //! Returns true if this entity belongs to the active selection
42 //! mode of parent object
7ab15952 43 Standard_Boolean IsActiveForSelection() const;
f751596e 44
45 //! Marks entity as inactive for selection
46 Standard_EXPORT void ResetSelectionActiveStatus() const;
47
48 //! Marks entity as active for selection
49 Standard_EXPORT void SetActiveForSelection() const;
50
ec357c5c 51 DEFINE_STANDARD_RTTI(SelectMgr_SensitiveEntity, Standard_Transient) // Type definition
7ab15952 52
f751596e 53private:
54
55 Handle(SelectBasics_SensitiveEntity) mySensitive; //!< Related SelectBasics entity
7ab15952 56 mutable Standard_Boolean myIsActiveForSelection; //!< Selection activity status
f751596e 57};
58
7ab15952 59DEFINE_STANDARD_HANDLE(SelectMgr_SensitiveEntity, Standard_Transient)
60
f751596e 61#endif // _SelectMgr_SensitiveEntity_HeaderFile