COVISE Core
coCallFeedback.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 COCALLFEEDBACK_H
9#define COCALLFEEDBACK_H
10
11#include <appl/CoviseBase.h>
12#include "coModule.h"
13
14namespace covise
15{
16
18{
19public:
21 coCallFeedback(const coCallFeedback &orig);
22 virtual ~coCallFeedback();
23 void init(const char *n, const char *attrib);
24 void unMask(char *string) const;
25 void sendFeedback(const char *info, const char *key, const char *data = NULL);
26 void executeModule(void);
27 void copyModule();
28 void copyModuleExec();
29 void deleteModule();
30
31 int getBooleanParam(unsigned int paraNo, int &value) const;
32 int getIntScalarParam(unsigned int paraNo, int &value) const;
33 int getFloatScalarParam(unsigned int paraNo, float &value) const;
34 int getIntSliderParam(unsigned int paraNo, int &min, int &max, int &val) const;
35 int getFloatSliderParam(unsigned int paraNo, float &min, float &max, float &val) const;
36 int getIntVectorParam(unsigned int paraNo, int &numElem, int *&val) const;
37 int getFloatVectorParam(unsigned int paraNo, int &numElem, float *&val) const;
38 int getStringParam(unsigned int paraNo, const char *&val) const;
39 int getChoiceParam(unsigned int paraNo, int &num, char **&labels, int &active) const;
40 int getFileBrowserParam(unsigned int paraNo, char *&val) const;
41 int getBooleanParam(const std::string &paraName, int &value) const;
42 int getIntScalarParam(const std::string &paraName, int &value) const;
43 int getFloatScalarParam(const std::string &paraName, float &value) const;
44 int getIntSliderParam(const std::string &paraName, int &min, int &max, int &val) const;
45 int getFloatSliderParam(const std::string &paraName, float &min, float &max, float &val) const;
46 int getIntVectorParam(const std::string &paraName, int &numElem, int *&val) const;
47 int getFloatVectorParam(const std::string &paraName, int &numElem, float *&val) const;
48 int getStringParam(const std::string &paraName, const char *&val) const;
49 int getChoiceParam(const std::string &paraName, int &num, char **&labels, int &active) const;
50 int getFileBrowserParam(const std::string &paraName, char *&val) const;
51 void setBooleanParam(const char *name, int val);
52 void setScalarParam(const char *name, float val);
53 void setScalarParam(const char *name, int val);
54 void setSliderParam(const char *name, float min, float max, float value);
55 void setSliderParam(const char *name, int min, int max, int value);
56 void setVectorParam(const char *name, int numElem, float *field);
57 void setVectorParam(const char *name, float u, float v, float w);
58 void setVectorParam(const char *name, int numElem, int *field);
59 void setVectorParam(const char *name, int u, int v, int w);
60 void setStringParam(const char *name, const char *val);
61 void setChoiceParam(const char *name, int num, const char *const *list, int pos);
62 void setFileBrowserParam(const char *name, const char *val);
63
64 void setChoiceParam(const char *name, int const pos);
65 void setChoiceParam(const char *name, std::string const label);
66 void setFloatSliderParam(const char *name, float const value);
67
68 const char *getObjName()
69 {
70 return d_objName;
71 }
72 const char *getPluginName()
73 {
74 return d_pluginName;
75 }
76 const char *getModuleName()
77 {
78 return d_moduleName;
79 }
81 {
82 return d_moduleInstance;
83 }
84 const char *getModuleHost()
85 {
86 return d_moduleHost;
87 }
88 const char *getInfo()
89 {
90 return d_infoString;
91 }
92 int getNumParam() const
93 {
94 return d_numPara;
95 }
96 int getNumUser() const
97 {
98 return d_numUser;
99 }
100 const char *getParaName(unsigned int i) const;
101 const char *getParaType(unsigned int i) const;
102 const char *getParaValue(unsigned int i) const;
103 const char *getString(unsigned int i) const;
104 void print(FILE *outfile);
105
106private:
107 struct paraRec
108 {
109 const char *name;
110 const char *type;
111 const char *value;
112 };
113
114 char *d_feedbackInfo; // the part of the attrib created by ApplLib
116 char *d_objName; // the name of the DO with the attirbs
117 char *d_moduleName; // the name of the module
118 int d_moduleInstance; // the instance of the module
119 char *d_moduleHost; // the hostname of the module
120 char *d_pluginName; // the name of the Plugin to load for this Interactor
121 char *d_infoString; // whatever the user put in the attribute
122
123 unsigned int d_numPara; // number of parameters
124 unsigned int d_numUser; // number of user strings
125 paraRec *d_param; // Parameters
126 char **d_user; // User strings
127 char *d_splitString; // save splitted string in here
128};
129}
130#endif /* COCALLFEEDBACK_H */
#define NULL
Definition: covise_list.h:22
GLsizei const GLchar *const * string
Definition: khronos-glext.h:6750
GLdouble n
Definition: khronos-glext.h:8447
const GLdouble * v
Definition: khronos-glext.h:6442
GLsizei const GLfloat * value
Definition: khronos-glext.h:6760
GLuint GLfloat * val
Definition: khronos-glext.h:7898
GLuint const GLchar * name
Definition: khronos-glext.h:6722
GLuint GLuint num
Definition: khronos-glext.h:10593
GLuint GLsizei const GLchar * label
Definition: khronos-glext.h:8634
GLubyte GLubyte GLubyte GLubyte w
Definition: khronos-glext.h:6793
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: khronos-glext.h:6354
int min(int a, int b)
Definition: cutil_math.h:60
int max(int a, int b)
Definition: cutil_math.h:55
list of all chemical elements
Definition: coConfig.h:27
Definition: CoviseBase.h:66
Definition: coCallFeedback.h:18
void copyModuleExec()
Definition: coCallFeedback.cpp:263
void copyModule()
Definition: coCallFeedback.cpp:254
int getChoiceParam(unsigned int paraNo, int &num, char **&labels, int &active) const
Definition: coCallFeedback.cpp:829
int getFloatScalarParam(unsigned int paraNo, float &value) const
Definition: coCallFeedback.cpp:680
int getModuleInstance()
Definition: coCallFeedback.h:80
void setFileBrowserParam(const char *name, const char *val)
Definition: coCallFeedback.cpp:497
void sendFeedback(const char *info, const char *key, const char *data=NULL)
Definition: coCallFeedback.cpp:930
int getNumUser() const
Definition: coCallFeedback.h:96
int getNumParam() const
Definition: coCallFeedback.h:92
void print(FILE *outfile)
Definition: coCallFeedback.cpp:943
char ** d_user
Definition: coCallFeedback.h:126
void setFloatSliderParam(const char *name, float const value)
Definition: coCallFeedback.cpp:919
char * d_moduleHost
Definition: coCallFeedback.h:119
const char * getInfo()
Definition: coCallFeedback.h:88
int getFloatSliderParam(unsigned int paraNo, float &min, float &max, float &val) const
Definition: coCallFeedback.cpp:704
virtual ~coCallFeedback()
Definition: coCallFeedback.cpp:27
int getFileBrowserParam(unsigned int paraNo, char *&val) const
Definition: coCallFeedback.cpp:815
char * d_infoString
Definition: coCallFeedback.h:121
char * d_moduleName
Definition: coCallFeedback.h:117
int d_refCount
Definition: coCallFeedback.h:115
int getBooleanParam(unsigned int paraNo, int &value) const
Definition: coCallFeedback.cpp:656
const char * getString(unsigned int i) const
void setScalarParam(const char *name, float val)
Definition: coCallFeedback.cpp:404
int d_moduleInstance
Definition: coCallFeedback.h:118
const char * getObjName()
Definition: coCallFeedback.h:68
unsigned int d_numUser
Definition: coCallFeedback.h:124
int getIntVectorParam(unsigned int paraNo, int &numElem, int *&val) const
Definition: coCallFeedback.cpp:732
void setVectorParam(const char *name, int numElem, float *field)
Definition: coCallFeedback.cpp:305
const char * getParaType(unsigned int i) const
const char * getModuleName()
Definition: coCallFeedback.h:76
void deleteModule()
Definition: coCallFeedback.cpp:272
char * d_splitString
Definition: coCallFeedback.h:127
void setStringParam(const char *name, const char *val)
Definition: coCallFeedback.cpp:479
coCallFeedback()
Definition: coCallFeedback.cpp:19
unsigned int d_numPara
Definition: coCallFeedback.h:123
const char * getParaValue(unsigned int i) const
char * d_feedbackInfo
Definition: coCallFeedback.h:114
void setSliderParam(const char *name, float min, float max, float value)
Definition: coCallFeedback.cpp:441
void executeModule(void)
Definition: coCallFeedback.cpp:245
int getIntScalarParam(unsigned int paraNo, int &value) const
Definition: coCallFeedback.cpp:668
void unMask(char *string) const
Definition: coCallFeedback.cpp:227
int getIntSliderParam(unsigned int paraNo, int &min, int &max, int &val) const
Definition: coCallFeedback.cpp:692
paraRec * d_param
Definition: coCallFeedback.h:125
void setChoiceParam(const char *name, int num, const char *const *list, int pos)
Definition: coCallFeedback.cpp:515
char * d_pluginName
Definition: coCallFeedback.h:120
char * d_objName
Definition: coCallFeedback.h:116
void init(const char *n, const char *attrib)
Definition: coCallFeedback.cpp:31
const char * getPluginName()
Definition: coCallFeedback.h:72
void setBooleanParam(const char *name, int val)
Definition: coCallFeedback.cpp:289
const char * getParaName(unsigned int i) const
Definition: coCallFeedback.cpp:281
int getFloatVectorParam(unsigned int paraNo, int &numElem, float *&val) const
Definition: coCallFeedback.cpp:766
const char * getModuleHost()
Definition: coCallFeedback.h:84
int getStringParam(unsigned int paraNo, const char *&val) const
Definition: coCallFeedback.cpp:800
Definition: coCallFeedback.h:108
const char * name
Definition: coCallFeedback.h:109
const char * type
Definition: coCallFeedback.h:110
const char * value
Definition: coCallFeedback.h:111