0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / IFSelect / IFSelect_IntParam.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-11-30
2// Created by: Christian CAILLET
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IFSelect_IntParam_HeaderFile
18#define _IFSelect_IntParam_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Integer.hxx>
24#include <TCollection_AsciiString.hxx>
25#include <MMgt_TShared.hxx>
26#include <Standard_CString.hxx>
27
28
29class IFSelect_IntParam;
30DEFINE_STANDARD_HANDLE(IFSelect_IntParam, MMgt_TShared)
31
32//! This class simply allows to access an Integer value through a
33//! Handle, as a String can be (by using HString).
34//! Hence, this value can be accessed : read and modified, without
35//! passing through the specific object which detains it. Thus,
36//! parameters of a Selection or a Dispatch (according its type)
37//! can be controlled directly from the ShareOut which contains them
38//!
39//! Additionnaly, an IntParam can be bound to a Static.
40//! Remember that for a String, binding is immediate, because the
41//! string value of a Static is a HAsciiString, it then suffices
42//! to get its Handle.
43//! For an Integer, an IntParam can designate (by its name) a
44//! Static : each time its value is required or set, the Static
45//! is aknowledged
46class IFSelect_IntParam : public MMgt_TShared
47{
48
49public:
50
51
52 //! Creates an IntParam. Initial value is set to zer
53 Standard_EXPORT IFSelect_IntParam();
54
55 //! Commands this IntParam to be bound to a Static
56 //! Hence, Value will return the value if this Static if it is set
57 //! Else, Value works on the locally stored value
58 //! SetValue also will set the value of the Static
59 //! This works only for a present static of type integer or enum
60 //! Else, it is ignored
61 //!
62 //! If <statname> is empty, disconnects the IntParam from Static
63 Standard_EXPORT void SetStaticName (const Standard_CString statname);
64
65 //! Returns the name of static parameter to which this IntParam
66 //! is bound, empty if none
67 Standard_EXPORT Standard_CString StaticName() const;
68
69 //! Reads Integer Value of the IntParam. If a StaticName is
70 //! defined and the Static is set, looks in priority the value
71 //! of the static
72 Standard_EXPORT Standard_Integer Value() const;
73
74 //! Sets a new Integer Value for the IntParam. If a StaticName is
75 //! defined and the Static is set, also sets the value of the static
76 Standard_EXPORT void SetValue (const Standard_Integer val);
77
78
79
80
92efcf78 81 DEFINE_STANDARD_RTTIEXT(IFSelect_IntParam,MMgt_TShared)
42cf5bc1 82
83protected:
84
85
86
87
88private:
89
90
91 Standard_Integer theval;
92 TCollection_AsciiString thestn;
93
94
95};
96
97
98
99
100
101
102
103#endif // _IFSelect_IntParam_HeaderFile