COVISE Core
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
40namespace 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:
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
#define UTILEXPORT
Definition: coExport.h:206
GLsizei const GLchar *const * string
Definition: khronos-glext.h:6750
GLboolean GLenum GLenum GLvoid * values
Definition: khronos-glext.h:6369
GLboolean GLuint group
Definition: khronos-glext.h:12389
GLuint GLfloat * val
Definition: khronos-glext.h:7898
int min(int a, int b)
Definition: cutil_math.h:60
list of all chemical elements
Definition: coConfig.h:27
T get(TokenBuffer &tb)
Definition: tokenbuffer_util.h:15
Definition: coRestraint.h:44
std::string restraintString
Definition: coRestraint.h:50
bool all
Definition: coRestraint.h:46
std::vector< ssize_t > max
Definition: coRestraint.h:48
bool changed
Definition: coRestraint.h:49