15 std::ostringstream ss;
23 bool isChar = r.
Get(s,c);
24 bool isCharStar = r.
Get(s,cs);
25 bool isInt = r.
Get(s,i);
26 bool isDouble = r.
Get(s,d);
27 bool isRegistry = r.
Get(s,reg);
30 if (isChar) { ss <<
c; }
31 else if (isCharStar) { ss <<
"'"<<cs<<
"'"; }
32 else if (isInt) { ss << i; }
33 else if (isDouble) { ss <<
d;
if (rint(d)==d) { ss <<
".0"; } }
34 else if (isRegistry) { ss << reg; }
35 else { assert(
"Unknown type or bad key in registry"==0); }
53 char* scopy =
new char[len+1];
61 for (
int i=0; i<len; ++i) {
63 if (scopy[i] ==
'=') {
68 for (cKey=cEqual-1; *cKey==
' ' && cKey>scopy; --cKey) { *cKey =
'\0'; }
69 for (; *cKey!=
' ' && *cKey!=
',' && *cKey!=
'\0' && cKey>scopy; --cKey) { ; }
70 for (; *cKey==
' ' || *cKey==
'\0'; ++cKey) { ; }
73 for (cValue=cEqual+1; *cValue==
' '&&*cValue!=
'\0'; ++cValue) {
76 while (*cValue==
' ') { ++cValue; }
79 bool isString =
false;
80 if (*cValue==
'\'' || *cValue==
'\"') {
82 char stringDelim = *cValue;
84 for (cEnd = cValue; *cEnd!=
'\0' && *cEnd!=stringDelim; ++cEnd) { ; }
86 for (cEnd = cValue; *cEnd!=
'\0'&& *cEnd!=
' '&& *cEnd!=
','; ++cEnd) { ; }
94 int val = atoi(cValue);
97 double d = atof(cValue);
104 if (strlen(cValue)==1) {