|
|
constants.hGo to the documentation of this file.00001 #ifndef CONSTANTSH 00002 #define CONSTANTSH 00003 00004 #include "boolean.h" 00005 00006 #include <stdio.h> 00007 00008 00019 /************************************************************************************/ 00026 #define INIT_NUM_CONSTANTS 10 00027 /************************************************************************************/ 00028 00036 typedef struct { 00037 char *name; 00038 double vs; 00039 } Tconstant; 00040 00053 typedef struct { 00054 unsigned int max_constants; 00055 unsigned int n; 00056 Tconstant *cts; 00057 } Tconstants; 00058 00066 void InitConstants(Tconstants *cts); 00067 00077 unsigned int NConstants(Tconstants *cts); 00078 00095 unsigned int AddConstant(char *name,double v,Tconstants *cts); 00096 00109 unsigned int GetConstantWithName(char *name,Tconstants *cts); 00110 00123 double GetConstantValue(unsigned int n,Tconstants *cts); 00124 00133 void PrintConstants(FILE *f,Tconstants *cts); 00134 00142 void DeleteConstants(Tconstants *cts); 00143 00144 #endif |