variable.h
Go to the documentation of this file.
1 #ifndef VARIABLEH
2 #define VARIABLEH
3 
4 #include "interval.h"
5 
16 /************************************************************************************/
24 #define SYSTEM_VAR 1
25 
26 /************************************************************************************/
44 #define SECONDARY_VAR 2
45 
53 #define DUMMY_VAR 4
54 
62 #define CARTESIAN_VAR 8
63 
68 #define ANY_TYPE_VAR (SYSTEM_VAR|SECONDARY_VAR|DUMMY_VAR|CARTESIAN_VAR)
69 
74 #define NOTYPE_VAR 16
75 /************************************************************************************/
76 
84 typedef struct
85 {
86  unsigned int type;
89  unsigned int topology;
90  char *name;
92 } Tvariable;
93 
103 void NewVariable(unsigned int type,char *name,Tvariable *v);
104 
113 void CopyVariable(Tvariable *v_dst,Tvariable *v_src);
114 
124 void SetVariableTopology(unsigned int t,Tvariable *v);
125 
138 unsigned int GetVariableTopology(Tvariable *v);
139 
149 unsigned int GetVariableType(Tvariable *v);
150 
160 char *GetVariableName(Tvariable *v);
161 
172 
183 
192 void PrintVariable(FILE *f,Tvariable *v);
193 
201 void DeleteVariable(Tvariable *v);
202 
203 #endif
unsigned int type
Definition: variable.h:86
unsigned int GetVariableType(Tvariable *v)
Gets the variable type.
Definition: variable.c:58
Tinterval is
Definition: variable.h:91
void PrintVariable(FILE *f, Tvariable *v)
Prints a variable.
Definition: variable.c:78
void SetVariableInterval(Tinterval *i, Tvariable *v)
Sets the new range for the variable.
Definition: variable.c:68
void CopyVariable(Tvariable *v_dst, Tvariable *v_src)
Copy constructor.
Definition: variable.c:31
void DeleteVariable(Tvariable *v)
Destructor.
Definition: variable.c:93
unsigned int GetVariableTopology(Tvariable *v)
Gets the topology of the variable.
Definition: variable.c:50
void NewVariable(unsigned int type, char *name, Tvariable *v)
Constructor.
Definition: variable.c:20
Data associated with each variable in the problem.
Definition: variable.h:84
char * name
Definition: variable.h:90
void SetVariableTopology(unsigned int t, Tvariable *v)
Sets the topology of the variable.
Definition: variable.c:42
unsigned int topology
Definition: variable.h:89
char * GetVariableName(Tvariable *v)
Gets the variable name.
Definition: variable.c:63
Tinterval * GetVariableInterval(Tvariable *v)
Gets the range of valid values for the variable.
Definition: variable.c:73
Defines a interval.
Definition: interval.h:33
Definition of the Tinterval type and the associated functions.