190 |
190 |
191 |
191 |
192 |
192 |
193 bool get_datatype_info_c::is_ANY_MAGNITUDE(symbol_c *type_symbol) { |
193 bool get_datatype_info_c::is_ANY_MAGNITUDE(symbol_c *type_symbol) { |
194 if (type_symbol == NULL) {return false;} |
194 if (type_symbol == NULL) {return false;} |
195 if (typeid(*type_symbol) == typeid(time_type_name_c)) {return true;} |
195 if (is_TIME(type_symbol)) {return true;} |
196 if (is_ANY_NUM(type_symbol)) {return true;} |
196 if (is_ANY_NUM(type_symbol)) {return true;} |
197 return false; |
197 return false; |
198 } |
198 } |
199 |
199 |
200 |
200 |
201 bool get_datatype_info_c::is_ANY_SAFEMAGNITUDE(symbol_c *type_symbol) { |
201 bool get_datatype_info_c::is_ANY_SAFEMAGNITUDE(symbol_c *type_symbol) { |
202 if (type_symbol == NULL) {return false;} |
202 if (type_symbol == NULL) {return false;} |
203 if (typeid(*type_symbol) == typeid(safetime_type_name_c)) {return true;} |
203 if (is_SAFETIME(type_symbol)) {return true;} |
204 if (is_ANY_SAFENUM(type_symbol)) {return true;} |
204 if (is_ANY_SAFENUM(type_symbol)) {return true;} |
205 return false; |
205 return false; |
206 } |
206 } |
207 |
207 |
208 |
208 |
292 |
292 |
293 bool get_datatype_info_c::is_ANY_signed_NUM_compatible(symbol_c *type_symbol) { |
293 bool get_datatype_info_c::is_ANY_signed_NUM_compatible(symbol_c *type_symbol) { |
294 if (type_symbol == NULL) {return false;} |
294 if (type_symbol == NULL) {return false;} |
295 if (is_ANY_signed_NUM (type_symbol)) {return true;} |
295 if (is_ANY_signed_NUM (type_symbol)) {return true;} |
296 if (is_ANY_signed_SAFENUM(type_symbol)) {return true;} |
296 if (is_ANY_signed_SAFENUM(type_symbol)) {return true;} |
297 return false; |
|
298 } |
|
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 |
|
305 |
|
306 bool get_datatype_info_c::is_ANY_DATE(symbol_c *type_symbol) { |
|
307 if (type_symbol == NULL) {return false;} |
|
308 if (typeid(*type_symbol) == typeid(date_type_name_c)) {return true;} |
|
309 if (typeid(*type_symbol) == typeid(tod_type_name_c)) {return true;} |
|
310 if (typeid(*type_symbol) == typeid(dt_type_name_c)) {return true;} |
|
311 return false; |
|
312 } |
|
313 |
|
314 |
|
315 bool get_datatype_info_c::is_ANY_SAFEDATE(symbol_c *type_symbol) { |
|
316 if (type_symbol == NULL) {return false;} |
|
317 if (typeid(*type_symbol) == typeid(safedate_type_name_c)) {return true;} |
|
318 if (typeid(*type_symbol) == typeid(safetod_type_name_c)) {return true;} |
|
319 if (typeid(*type_symbol) == typeid(safedt_type_name_c)) {return true;} |
|
320 return false; |
|
321 } |
|
322 |
|
323 |
|
324 bool get_datatype_info_c::is_ANY_DATE_compatible(symbol_c *type_symbol) { |
|
325 if (type_symbol == NULL) {return false;} |
|
326 if (is_ANY_DATE (type_symbol)) {return true;} |
|
327 if (is_ANY_SAFEDATE(type_symbol)) {return true;} |
|
328 return false; |
|
329 } |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 bool get_datatype_info_c::is_ANY_STRING(symbol_c *type_symbol) { |
|
338 if (type_symbol == NULL) {return false;} |
|
339 if (typeid(*type_symbol) == typeid(string_type_name_c)) {return true;} |
|
340 if (typeid(*type_symbol) == typeid(wstring_type_name_c)) {return true;} |
|
341 return false; |
|
342 } |
|
343 |
|
344 |
|
345 bool get_datatype_info_c::is_ANY_SAFESTRING(symbol_c *type_symbol) { |
|
346 if (type_symbol == NULL) {return false;} |
|
347 if (typeid(*type_symbol) == typeid(safestring_type_name_c)) {return true;} |
|
348 if (typeid(*type_symbol) == typeid(safewstring_type_name_c)) {return true;} |
|
349 return false; |
|
350 } |
|
351 |
|
352 |
|
353 bool get_datatype_info_c::is_ANY_STRING_compatible(symbol_c *type_symbol) { |
|
354 if (type_symbol == NULL) {return false;} |
|
355 if (is_ANY_STRING (type_symbol)) {return true;} |
|
356 if (is_ANY_SAFESTRING(type_symbol)) {return true;} |
|
357 return false; |
297 return false; |
358 } |
298 } |
359 |
299 |
360 |
300 |
361 |
301 |
579 return false; |
518 return false; |
580 } |
519 } |
581 |
520 |
582 |
521 |
583 |
522 |
|
523 |
|
524 |
|
525 |
|
526 |
|
527 |
|
528 bool get_datatype_info_c::is_TIME(symbol_c *type_symbol) { |
|
529 if (type_symbol == NULL) {return false;} |
|
530 if (typeid(*type_symbol) == typeid(time_type_name_c)) {return true;} |
|
531 return false; |
|
532 } |
|
533 |
|
534 |
|
535 bool get_datatype_info_c::is_SAFETIME(symbol_c *type_symbol) { |
|
536 if (type_symbol == NULL) {return false;} |
|
537 if (typeid(*type_symbol) == typeid(safetime_type_name_c)) {return true;} |
|
538 return false; |
|
539 } |
|
540 |
|
541 |
|
542 bool get_datatype_info_c::is_TIME_compatible(symbol_c *type_symbol) { |
|
543 if (type_symbol == NULL) {return false;} |
|
544 if (is_TIME (type_symbol)) {return true;} |
|
545 if (is_SAFETIME(type_symbol)) {return true;} |
|
546 return false; |
|
547 } |
|
548 |
|
549 |
|
550 |
|
551 |
|
552 |
|
553 |
|
554 |
|
555 |
|
556 bool get_datatype_info_c::is_ANY_DATE(symbol_c *type_symbol) { |
|
557 if (type_symbol == NULL) {return false;} |
|
558 if (typeid(*type_symbol) == typeid(date_type_name_c)) {return true;} |
|
559 if (typeid(*type_symbol) == typeid(tod_type_name_c)) {return true;} |
|
560 if (typeid(*type_symbol) == typeid(dt_type_name_c)) {return true;} |
|
561 return false; |
|
562 } |
|
563 |
|
564 |
|
565 bool get_datatype_info_c::is_ANY_SAFEDATE(symbol_c *type_symbol) { |
|
566 if (type_symbol == NULL) {return false;} |
|
567 if (typeid(*type_symbol) == typeid(safedate_type_name_c)) {return true;} |
|
568 if (typeid(*type_symbol) == typeid(safetod_type_name_c)) {return true;} |
|
569 if (typeid(*type_symbol) == typeid(safedt_type_name_c)) {return true;} |
|
570 return false; |
|
571 } |
|
572 |
|
573 |
|
574 bool get_datatype_info_c::is_ANY_DATE_compatible(symbol_c *type_symbol) { |
|
575 if (type_symbol == NULL) {return false;} |
|
576 if (is_ANY_DATE (type_symbol)) {return true;} |
|
577 if (is_ANY_SAFEDATE(type_symbol)) {return true;} |
|
578 return false; |
|
579 } |
|
580 |
|
581 |
|
582 |
|
583 |
|
584 |
|
585 |
|
586 |
|
587 |
|
588 |
|
589 |
|
590 |
|
591 bool get_datatype_info_c::is_ANY_STRING(symbol_c *type_symbol) { |
|
592 if (type_symbol == NULL) {return false;} |
|
593 if (typeid(*type_symbol) == typeid(string_type_name_c)) {return true;} |
|
594 if (typeid(*type_symbol) == typeid(wstring_type_name_c)) {return true;} |
|
595 return false; |
|
596 } |
|
597 |
|
598 |
|
599 bool get_datatype_info_c::is_ANY_SAFESTRING(symbol_c *type_symbol) { |
|
600 if (type_symbol == NULL) {return false;} |
|
601 if (typeid(*type_symbol) == typeid(safestring_type_name_c)) {return true;} |
|
602 if (typeid(*type_symbol) == typeid(safewstring_type_name_c)) {return true;} |
|
603 return false; |
|
604 } |
|
605 |
|
606 |
|
607 bool get_datatype_info_c::is_ANY_STRING_compatible(symbol_c *type_symbol) { |
|
608 if (type_symbol == NULL) {return false;} |
|
609 if (is_ANY_STRING (type_symbol)) {return true;} |
|
610 if (is_ANY_SAFESTRING(type_symbol)) {return true;} |
|
611 return false; |
|
612 } |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 |
|
619 |
|
620 /* Can't we do away with this?? */ |
|
621 bool get_datatype_info_c::is_ANY_REAL_literal(symbol_c *type_symbol) { |
|
622 if (type_symbol == NULL) {return true;} /* Please make sure things will work correctly before changing this to false!! */ |
|
623 if (typeid(*type_symbol) == typeid(real_c)) {return true;} |
|
624 if (typeid(*type_symbol) == typeid(neg_real_c)) {return true;} |
|
625 return false; |
|
626 } |
|
627 |
|
628 /* Can't we do away with this?? */ |
|
629 bool get_datatype_info_c::is_ANY_INT_literal(symbol_c *type_symbol) { |
|
630 if (type_symbol == NULL) {return true;} /* Please make sure things will work correctly before changing this to false!! */ |
|
631 if (typeid(*type_symbol) == typeid(integer_c)) {return true;} |
|
632 if (typeid(*type_symbol) == typeid(neg_integer_c)) {return true;} |
|
633 if (typeid(*type_symbol) == typeid(binary_integer_c)) {return true;} |
|
634 if (typeid(*type_symbol) == typeid(octal_integer_c)) {return true;} |
|
635 if (typeid(*type_symbol) == typeid(hex_integer_c)) {return true;} |
|
636 return false; |
|
637 } |
|
638 |