COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coRestraint.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef COVISE_RESTRAINT_H
9 #define COVISE_RESTRAINT_H
10 /**************************************************************************\
11  ** **
12  ** **
13  ** Description: Interface classes for application modules to the COVISE **
14  ** software environment **
15  ** **
16  ** **
17  ** **
18  ** **
19  ** **
20  ** (C)1997 RUS **
21  ** Computing Center University of Stuttgart **
22  ** Allmandring 30 **
23  ** 70550 Stuttgart **
24  ** Author: **
25  ** Date: **
26 \**************************************************************************/
27 
28 #include <vector>
29 #include <string>
30 #include <cstdlib>
31 
32 #include "coExport.h"
33 #include "util/coTypes.h"
34 
35 #ifdef WIN32
36 #include <BaseTsd.h>
37 #include <Windows.h>
38 #endif
39 
40 namespace covise
41 {
42 
44 {
45  private:
46  bool all;
47  int globalStep = 1;
48  mutable std::vector<ssize_t> values, min, max, step;
49  mutable bool changed, stringCurrent;
51 
52  public:
53  coRestraint();
54  ~coRestraint();
55 
56  void add(ssize_t mi, ssize_t ma, ssize_t step=1);
57  void add(ssize_t val);
58  void add(const std::string &selection);
59  void cut();
60  bool get(ssize_t val, ssize_t &group) const;
61  size_t getNumGroups() const;
62  void clear();
63  const std::vector<ssize_t> &getValues() const;
64  ssize_t lower() const;
65  ssize_t upper() const;
66  const std::string &getRestraintString() const;
67  const std::string getRestraintString(std::vector<ssize_t>) const;
68 
69  // operators
70  bool operator ()(ssize_t val) const;
71 };
72 
73 }
74 #endif // COVISE_RESTRAINT_H
GLsizei const GLchar *const * string
Definition: khronos-glext.h:6750
std::vector< ssize_t > values
Definition: coRestraint.h:48
#define UTILEXPORT
Definition: coExport.h:194
Definition: coRestraint.h:43
int max(int a, int b)
Definition: cutil_math.h:55
bool stringCurrent
Definition: coRestraint.h:49
GLboolean GLuint group
Definition: khronos-glext.h:12389
std::string restraintString
Definition: coRestraint.h:50
GLuint GLfloat * val
Definition: khronos-glext.h:7898
int min(int a, int b)
Definition: cutil_math.h:60
bool all
Definition: coRestraint.h:46