WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Variable.h
1#ifndef _WINC_VARIABLE
2#define _WINC_VARIABLE
3
4#include <WXP/String.h>
5
6namespace WXP {
7 class Variable {
8 int type;
9 int ind;
10 float val1;
11 float val2;
12 char abbr[40];
13 char name[40];
14 char units[20];
15
16 public:
17 static const int max_abbr = 40;
18 static const int max_name = 40;
19 static const int max_units = 20;
20
21 Variable();
22 Variable( const char *ab );
23 Variable( const char *ab, const char *unit );
24 int init();
25 int set( const char *ab );
26 int set( const char *ab, const char *unit );
27 int setType( int t );
29 inline int getType(){ return type; };
30 int setInd( int t );
32 inline int getInd(){ return ind; };
34 inline int setVal1( float val ){ val1 = val; return 1; };
36 inline float getVal1(){ return val1; };
38 inline int setVal2( float val ){ val2 = val; return 1; };
40 inline float getVal2(){ return val2; };
41 int setName( const char *str );
43 inline const char *getName(){ return name; };
44 int setAbbr( const char *str );
46 inline const char *getAbbr(){ return abbr; };
47 int setUnits( const char *str );
49 inline const char *getUnits(){ return units; };
50 int toLabel( String &str );
51 int toIndCode();
52 int toAbbrCode( String &str );
53 int toString( String &str );
54 int decode( const char *str );
55 int print();
56
57 enum Type {
58 REG,
59 ACCUM,
60 MEAN,
61 MAX,
62 MIN,
63 PROB_LT,
64 PROB_GT,
65 PROB_LTH,
66 PROB_GTL,
67 PROB_BET,
68 ENS_MEMBER,
69 ENS_MEAN,
70 ENS_STDEV,
71 ENS_PROB_LT,
72 ENS_PROB_GT,
73 ENS_PROB_BET,
74 PERC
75 };
76 };
77}
78#endif
This is a variable length string class.
Definition String.h:5
This class specifies variable information.
Definition Variable.h:7
int setInd(int t)
Definition Variable.cc:92
float getVal1()
Definition Variable.h:36
int setName(const char *str)
Definition Variable.cc:101
int getType()
Definition Variable.h:29
int print()
Definition Variable.cc:582
Variable()
Definition Variable.cc:24
int setVal2(float val)
Definition Variable.h:38
int setUnits(const char *str)
Definition Variable.cc:119
int toIndCode()
Definition Variable.cc:290
int toAbbrCode(String &str)
Definition Variable.cc:403
const char * getUnits()
Definition Variable.h:49
int setAbbr(const char *str)
Definition Variable.cc:110
const char * getName()
Definition Variable.h:43
int set(const char *ab)
Definition Variable.cc:63
float getVal2()
Definition Variable.h:40
int toString(String &str)
Definition Variable.cc:218
int setVal1(float val)
Definition Variable.h:34
int toLabel(String &str)
Definition Variable.cc:128
int getInd()
Definition Variable.h:32
const char * getAbbr()
Definition Variable.h:46
int setType(int t)
Definition Variable.cc:83
int init()
Definition Variable.cc:48
int decode(const char *str)
Definition Variable.cc:478
All WXP classes fall under the WXP namespace.
Definition Angle.h:4