| 49 |
|
#define G_ZCONSTIME 28 |
| 50 |
|
#define G_NZCONSTRAINTS 29 |
| 51 |
|
#define G_ZCONSTOL 30 |
| 52 |
+ |
#define G_ZCONSFORCEPOLICY 31 |
| 53 |
|
|
| 54 |
|
Globals::Globals(){ |
| 55 |
|
|
| 92 |
|
addHash( "zconsTime", G_ZCONSTIME); |
| 93 |
|
addHash( "nZconstraints", G_NZCONSTRAINTS); |
| 94 |
|
addHash( "zconsTol", G_ZCONSTOL); |
| 95 |
+ |
addHash( "zconsForcePolicy", G_ZCONSFORCEPOLICY); |
| 96 |
+ |
|
| 97 |
|
|
| 98 |
|
// define some default values |
| 99 |
|
|
| 1039 |
|
} |
| 1040 |
|
break; |
| 1041 |
|
|
| 1042 |
+ |
case G_ZCONSFORCEPOLICY: |
| 1043 |
+ |
switch( the_type ){ |
| 1044 |
+ |
|
| 1045 |
+ |
case STRING: |
| 1046 |
+ |
strcpy(zconsForcePolicy, the_event->evt.asmt.rhs.sval); |
| 1047 |
|
|
| 1048 |
+ |
for(int i = 0; zconsForcePolicy[i] != '\0'; i++) |
| 1049 |
+ |
{ |
| 1050 |
+ |
zconsForcePolicy[i] = toupper(zconsForcePolicy[i]); |
| 1051 |
+ |
} |
| 1052 |
+ |
have_zcons_force_policy = 1; |
| 1053 |
+ |
return 1; |
| 1054 |
+ |
break; |
| 1055 |
+ |
|
| 1056 |
+ |
case DOUBLE: |
| 1057 |
+ |
the_event->err_msg = |
| 1058 |
+ |
strdup( "Global error. zconsForcePolicy is not a double or int.\n" ); |
| 1059 |
+ |
return 0; |
| 1060 |
+ |
break; |
| 1061 |
+ |
|
| 1062 |
+ |
case INT: |
| 1063 |
+ |
the_event->err_msg = |
| 1064 |
+ |
strdup( "Global error. zconsForcePolicy is not a double or int.\n" ); |
| 1065 |
+ |
return 0; |
| 1066 |
+ |
break; |
| 1067 |
+ |
|
| 1068 |
+ |
default: |
| 1069 |
+ |
the_event->err_msg = |
| 1070 |
+ |
strdup( "Global error. zconsForcePolicy unrecognized.\n" ); |
| 1071 |
+ |
return 0; |
| 1072 |
+ |
break; |
| 1073 |
+ |
} |
| 1074 |
+ |
break; |
| 1075 |
|
// add more token cases here. |
| 1076 |
|
|
| 1077 |
|
} |