View on GitHub

Vistle

Distributed Data-parallel Scientific Visualization in VR

coRestraint.h
Go to the documentation of this file.
1#ifndef COVISE_RESTRAINT_H
2#define COVISE_RESTRAINT_H
3/**************************************************************************\
4 ** **
5 ** **
6 ** Description: Interface classes for application modules to the COVISE **
7 ** software environment **
8 ** **
9 ** **
10 ** **
11 ** **
12 ** **
13 ** (C)1997 RUS **
14 ** Computing Center University of Stuttgart **
15 ** Allmandring 30 **
16 ** 70550 Stuttgart **
17 ** Author: **
18 ** Date: **
19\**************************************************************************/
20
21#include <vector>
22#include <string>
23
24#include "export.h"
25#include "ssize_t.h"
26
27namespace vistle {
28
30private:
31 bool all;
32 mutable std::vector<ssize_t> values, min, max;
33 mutable bool changed, stringCurrent;
34 mutable std::string restraintString;
35
36public:
39
40 void add(ssize_t mi, ssize_t ma);
41 void add(ssize_t val);
42 void add(const std::string &selection);
43 bool get(ssize_t val, ssize_t &group) const;
44 size_t getNumGroups() const { return min.size(); };
45 void clear();
46 const std::vector<ssize_t> &getValues() const;
47 ssize_t lower() const;
48 ssize_t upper() const;
49 const std::string &getRestraintString() const;
50 const std::string getRestraintString(std::vector<ssize_t>) const;
51
52 // operators
53 bool operator()(ssize_t val) const;
54};
55
56} // namespace vistle
57#endif // COVISE_RESTRAINT_H
Definition: coRestraint.h:29
size_t getNumGroups() const
Definition: coRestraint.h:44
static T min(T a, T b)
Definition: messages.cpp:28
Definition: allobjects.cpp:30
#define V_UTILEXPORT
Definition: export.h:19