yay, basic table assignment.

This commit is contained in:
Bernhard Amann 2011-10-26 17:02:57 -07:00
parent 5b0c307f87
commit b245d4168a
6 changed files with 87 additions and 8 deletions

View file

@ -143,6 +143,21 @@ bool InputReaderAscii::DoUpdate() {
val->val.string_val = new string(s);
break;
case TYPE_BOOL:
case TYPE_INT:
val->val.int_val = atoi(s.c_str());
break;
case TYPE_DOUBLE:
case TYPE_TIME:
case TYPE_INTERVAL:
val->val.double_val = atof(s.c_str());
break;
case TYPE_COUNT:
val->val.uint_val = atoi(s.c_str());
break;
default:
Error(Fmt("unsupported field format %d for %s", currMapping.type,
currMapping.name.c_str()));
@ -163,6 +178,7 @@ bool InputReaderAscii::DoUpdate() {
// for testing purposes: fixed event.
SendEvent("inputEvent", num_fields, fields);
Put(fields);
}