04.11.2011 - adjust for Windows & QNX, multiprotocol, repeater, signals, process, codec, console input

This commit is contained in:
peri4
2011-11-04 15:33:15 +03:00
parent 39ec9cac5c
commit e25553b97b
32 changed files with 468 additions and 294 deletions

View File

@@ -175,20 +175,20 @@ void PIVariable::setVariable(const PIString & str) {
void PIVariable::writeVariable(char * dest) {
switch (type_) {
case PIVariant::Bool: *((bool * )((long)dest + offset)) = value_; return;
case PIVariant::Char: *((char * )((long)dest + offset)) = value_; return;
case PIVariant::Short: *((short * )((long)dest + offset)) = value_; return;
case PIVariant::Int: *((int * )((long)dest + offset)) = value_; return;
case PIVariant::Long: *((long * )((long)dest + offset)) = value_; return;
case PIVariant::LLong: *((llong * )((long)dest + offset)) = value_; return;
case PIVariant::UChar: *((uchar * )((long)dest + offset)) = value_; return;
case PIVariant::UShort: *((ushort * )((long)dest + offset)) = value_; return;
case PIVariant::UInt: *((uint * )((long)dest + offset)) = value_; return;
case PIVariant::ULong: *((ulong * )((long)dest + offset)) = value_; return;
case PIVariant::ULLong: *((ullong * )((long)dest + offset)) = value_; return;
case PIVariant::Float: *((float * )((long)dest + offset)) = value_; return;
case PIVariant::Bool: *((bool * )((long)dest + offset)) = value_ > 0.; return;
case PIVariant::Char: *((char * )((long)dest + offset)) = char(value_); return;
case PIVariant::Short: *((short * )((long)dest + offset)) = short(value_); return;
case PIVariant::Int: *((int * )((long)dest + offset)) = int(value_); return;
case PIVariant::Long: *((long * )((long)dest + offset)) = long(value_); return;
case PIVariant::LLong: *((llong * )((long)dest + offset)) = llong(value_); return;
case PIVariant::UChar: *((uchar * )((long)dest + offset)) = uchar(value_); return;
case PIVariant::UShort: *((ushort * )((long)dest + offset)) = ushort(value_); return;
case PIVariant::UInt: *((uint * )((long)dest + offset)) = uint(value_); return;
case PIVariant::ULong: *((ulong * )((long)dest + offset)) = ulong(value_); return;
case PIVariant::ULLong: *((ullong * )((long)dest + offset)) = ullong(value_); return;
case PIVariant::Float: *((float * )((long)dest + offset)) = float(value_); return;
case PIVariant::Double: *((double * )((long)dest + offset)) = value_; return;
case PIVariant::LDouble: *((ldouble * )((long)dest + offset)) = value_; return;
case PIVariant::LDouble: *((ldouble * )((long)dest + offset)) = ldouble(value_); return;
default: break;
}
}