COVISE Core
coUifPara.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 _CO_PARA_PORT_H_
9#define _CO_PARA_PORT_H_
10
11// 13.09.99
12
13#include <covise/covise.h>
14#include "coPort.h"
15
20namespace covise
21{
22
24{
25
26public:
27 // Type information: which kind of port is this
28 typedef int Typeinfo;
29
30protected:
31 // calculate a number from a string: similar to DO, but not same
32 static Typeinfo numericType(const char *typeStr);
33
34private:
37
40
42 coUifPara(const coUifPara &old);
43
44protected:
45 // whether this port is active: inactive ports do not show up on show()
47
48public:
53 coUifPara(const char *name, const char *desc);
54
56 virtual ~coUifPara();
57
59 virtual void setActive(int isActive);
60
62 virtual void hide();
63
65 virtual void show();
66
68 virtual int paramChange() = 0;
69
71 virtual int preCompute()
72 {
73 return 0;
74 }
75
77 virtual void initialize() = 0;
78
80 virtual void print(ostream &str) const;
81
83 virtual int switchable() const;
84
87
89 virtual void enable();
90
92 virtual void disable();
93
95 virtual Kind kind() const;
96
98 int isActive() const;
99
101 void para_error(const char *what);
102
104 virtual const char *getTypeString() const = 0;
105
107 virtual const char *getValString() const = 0;
108
110 virtual void setValString(const char *str) = 0;
111};
112}
113#endif
#define APIEXPORT
Definition: coExport.h:275
GLuint const GLchar * name
Definition: khronos-glext.h:6722
GLboolean enable
Definition: khronos-glext.h:12389
GLenum type
Definition: khronos-glext.h:6279
list of all chemical elements
Definition: coConfig.h:27
std::enable_if< I==sizeof...(Tp), void >::type print(Stream &s, const std::tuple< Tp... > &t)
Definition: tokenbuffer_util.h:68
Definition: coPort.h:25
int Typeinfo
Definition: coPort.h:29
Kind
enum Kind: SWITCH, PARAM, INPORT, OUTPORT
Definition: coUifElem.h:26
Definition: coUifPara.h:24
coUifPara()
Default constructor: NOT IMPLEMENTED.
virtual int paramChange()=0
handle parameter changes: called by paramCB
int d_active
Definition: coUifPara.h:46
coUifPara & operator=(const coUifPara &)
Assignment operator: NOT IMPLEMENTED.
int Typeinfo
Definition: coUifPara.h:28
virtual const char * getValString() const =0
get the value of this parameter as a string
virtual int isOfType(coUifPara::Typeinfo type)=0
check whether this parameter port has a certain type
coUifPara(const coUifPara &old)
Copy-constructor: NOT IMPLEMENTED.
virtual void initialize()=0
give all necessary info to Covise -> automatically called !
virtual void setValString(const char *str)=0
set the value of this parameter from a string
virtual int preCompute()
do whatever needed before compute CB : enforce that all parameters do sth.
Definition: coUifPara.h:71
virtual const char * getTypeString() const =0
get the type string of this parameter