#include "orbsvcs/Trader/Constraint_Nodes.h"
#include "orbsvcs/Trader/Constraint_Visitors.h"
#include "tao/AnyTypeCode/Any.h"
#include "ace/OS_NS_string.h"
Include dependency graph for Constraint_Nodes.cpp:
Go to the source code of this file.
|
Definition at line 809 of file Constraint_Nodes.cpp. References TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00811 { 00812 TAO_Expression_Type widest_type = 00813 TAO_Literal_Constraint::widest_type (left, right); 00814 00815 switch (widest_type) 00816 { 00817 case TAO_DOUBLE: 00818 { 00819 CORBA::Double result = (CORBA::Double) left * (CORBA::Double) right; 00820 return TAO_Literal_Constraint ((CORBA::Double) result); 00821 } 00822 case TAO_SIGNED: 00823 { 00824 CORBA::Long result = (CORBA::Long) left * (CORBA::Long) right; 00825 return TAO_Literal_Constraint ((CORBA::Long) result); 00826 } 00827 case TAO_UNSIGNED: 00828 { 00829 CORBA::ULong result = (CORBA::ULong) left * (CORBA::ULong) right; 00830 return TAO_Literal_Constraint ((CORBA::ULong) result); 00831 } 00832 default: 00833 return TAO_Literal_Constraint ((CORBA::Long)0); 00834 } 00835 } |
|
Definition at line 590 of file Constraint_Nodes.cpp. References ACE_OS::strcmp(), TAO_BOOLEAN, TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_STRING, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00592 { 00593 bool return_value = false; 00594 TAO_Expression_Type widest_type = 00595 TAO_Literal_Constraint::widest_type (left, right); 00596 00597 switch (widest_type) 00598 { 00599 case TAO_STRING: 00600 return_value = (ACE_OS::strcmp ((const char*) left, (const char*) right) != 0); 00601 break; 00602 case TAO_DOUBLE: 00603 return_value = (CORBA::Double) left != (CORBA::Double) right; 00604 break; 00605 case TAO_SIGNED: 00606 return_value = (CORBA::Long) left != (CORBA::Long) right; 00607 break; 00608 case TAO_UNSIGNED: 00609 return_value = (CORBA::ULong) left != (CORBA::ULong) right; 00610 break; 00611 case TAO_BOOLEAN: 00612 return_value = (CORBA::Boolean) left != (CORBA::Boolean) right; 00613 break; 00614 } 00615 00616 return return_value; 00617 } |
|
Definition at line 751 of file Constraint_Nodes.cpp. References TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00753 { 00754 TAO_Expression_Type widest_type = 00755 TAO_Literal_Constraint::widest_type (left, right); 00756 00757 switch (widest_type) 00758 { 00759 case TAO_DOUBLE: 00760 { 00761 CORBA::Double result = (CORBA::Double) left + (CORBA::Double) right; 00762 return TAO_Literal_Constraint ((CORBA::Double) result); 00763 } 00764 case TAO_SIGNED: 00765 { 00766 CORBA::Long result = (CORBA::Long) left + (CORBA::Long) right; 00767 return TAO_Literal_Constraint ((CORBA::Long) result); 00768 } 00769 case TAO_UNSIGNED: 00770 { 00771 CORBA::ULong result = (CORBA::ULong) left + (CORBA::ULong) right; 00772 return TAO_Literal_Constraint ((CORBA::ULong) result); 00773 } 00774 default: 00775 return TAO_Literal_Constraint ((CORBA::Long)0); 00776 } 00777 } |
|
Definition at line 867 of file Constraint_Nodes.cpp. References TAO_Literal_Constraint::expr_type(), TAO_DOUBLE, TAO_SIGNED, and TAO_UNSIGNED.
00868 { 00869 switch (operand.expr_type ()) 00870 { 00871 case TAO_DOUBLE: 00872 { 00873 CORBA::Double result = - (CORBA::Double) operand; 00874 return TAO_Literal_Constraint ((CORBA::Double) result); 00875 } 00876 case TAO_SIGNED: 00877 { 00878 CORBA::Long result = - (CORBA::Long) operand; 00879 return TAO_Literal_Constraint ((CORBA::Long) result); 00880 } 00881 case TAO_UNSIGNED: 00882 { 00883 CORBA::Long result = - (CORBA::Long) ((CORBA::ULong) operand); 00884 return TAO_Literal_Constraint ((CORBA::ULong) result); 00885 } 00886 default: 00887 return TAO_Literal_Constraint ((CORBA::Long)0); 00888 } 00889 } |
|
Definition at line 780 of file Constraint_Nodes.cpp. References TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00782 { 00783 TAO_Expression_Type widest_type = 00784 TAO_Literal_Constraint::widest_type (left, right); 00785 00786 switch (widest_type) 00787 { 00788 case TAO_DOUBLE: 00789 { 00790 CORBA::Double result = (CORBA::Double) left - (CORBA::Double) right; 00791 return TAO_Literal_Constraint ((CORBA::Double) result); 00792 } 00793 case TAO_SIGNED: 00794 { 00795 CORBA::Long result = (CORBA::Long) left - (CORBA::Long) right; 00796 return TAO_Literal_Constraint ((CORBA::Long) result); 00797 } 00798 case TAO_UNSIGNED: 00799 { 00800 CORBA::ULong result = (CORBA::ULong) left - (CORBA::ULong) right; 00801 return TAO_Literal_Constraint ((CORBA::ULong) result); 00802 } 00803 default: 00804 return TAO_Literal_Constraint ((CORBA::Long)0); 00805 } 00806 } |
|
Definition at line 838 of file Constraint_Nodes.cpp. References TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00840 { 00841 TAO_Expression_Type widest_type = 00842 TAO_Literal_Constraint::widest_type (left, right); 00843 00844 switch (widest_type) 00845 { 00846 case TAO_DOUBLE: 00847 { 00848 CORBA::Double result = (CORBA::Double) left / (CORBA::Double) right; 00849 return TAO_Literal_Constraint ((CORBA::Double) result); 00850 } 00851 case TAO_SIGNED: 00852 { 00853 CORBA::Long result = (CORBA::Long) left / (CORBA::Long) right; 00854 return TAO_Literal_Constraint ((CORBA::Long) result); 00855 } 00856 case TAO_UNSIGNED: 00857 { 00858 CORBA::ULong result = (CORBA::ULong) left / (CORBA::ULong) right; 00859 return TAO_Literal_Constraint ((CORBA::ULong) result); 00860 } 00861 default: 00862 return TAO_Literal_Constraint ((CORBA::Long)0); 00863 } 00864 } |
|
Definition at line 620 of file Constraint_Nodes.cpp. References ACE_OS::strcmp(), TAO_BOOLEAN, TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_STRING, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00622 { 00623 bool return_value = false; 00624 TAO_Expression_Type widest_type = 00625 TAO_Literal_Constraint::widest_type (left, right); 00626 00627 switch (widest_type) 00628 { 00629 case TAO_STRING: 00630 return_value = (ACE_OS::strcmp ((const char*) left, (const char*) right) < 0); 00631 break; 00632 case TAO_DOUBLE: 00633 return_value = (CORBA::Double) left < (CORBA::Double) right; 00634 break; 00635 case TAO_SIGNED: 00636 return_value = (CORBA::Long) left < (CORBA::Long) right; 00637 break; 00638 case TAO_UNSIGNED: 00639 return_value = (CORBA::ULong) left < (CORBA::ULong) right; 00640 break; 00641 case TAO_BOOLEAN: 00642 return_value = (CORBA::Boolean) left < (CORBA::Boolean) right; 00643 break; 00644 } 00645 00646 return return_value; 00647 } |
|
Definition at line 650 of file Constraint_Nodes.cpp. References ACE_OS::strcmp(), TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_STRING, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00652 { 00653 bool return_value = false; 00654 TAO_Expression_Type widest_type = 00655 TAO_Literal_Constraint::widest_type (left, right); 00656 00657 switch (widest_type) 00658 { 00659 case TAO_STRING: 00660 return_value = (ACE_OS::strcmp ((const char*) left, (const char*) right) <= 0); 00661 break; 00662 case TAO_DOUBLE: 00663 return_value = (CORBA::Double) left <= (CORBA::Double) right; 00664 break; 00665 case TAO_SIGNED: 00666 return_value = (CORBA::Long) left <= (CORBA::Long) right; 00667 break; 00668 case TAO_UNSIGNED: 00669 return_value = (CORBA::ULong) left <= (CORBA::ULong) right; 00670 break; 00671 } 00672 00673 return return_value; 00674 } |
|
Definition at line 738 of file Constraint_Nodes.cpp. References ACE_OS::strcmp().
00740 { 00741 bool result = false; 00742 00743 if ((const char*) right != 0) 00744 result = ACE_OS::strcmp ((const char*) left, 00745 (const char*) right) == 0; 00746 return result; 00747 } |
|
Definition at line 732 of file Constraint_Nodes.cpp.
00733 {
00734 return (left == (CORBA::Double) right);
00735 }
|
|
Definition at line 559 of file Constraint_Nodes.cpp. References ACE_OS::strcmp(), TAO_BOOLEAN, TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_STRING, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00561 { 00562 bool return_value = false; 00563 TAO_Expression_Type widest_type = 00564 TAO_Literal_Constraint::widest_type (left, right); 00565 00566 switch (widest_type) 00567 { 00568 case TAO_STRING: 00569 return_value = (ACE_OS::strcmp ((const char*) left, (const char*) right) == 0); 00570 break; 00571 case TAO_DOUBLE: 00572 return_value = (CORBA::Double) left == (CORBA::Double) right; 00573 break; 00574 case TAO_SIGNED: 00575 return_value = (CORBA::Long) left == (CORBA::Long) right; 00576 break; 00577 case TAO_UNSIGNED: 00578 return_value = (CORBA::ULong) left == (CORBA::ULong) right; 00579 break; 00580 case TAO_BOOLEAN: 00581 return_value = (CORBA::Boolean) left == (CORBA::Boolean) right; 00582 break; 00583 } 00584 00585 return return_value; 00586 } |
|
Definition at line 677 of file Constraint_Nodes.cpp. References ACE_OS::strcmp(), TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_STRING, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00679 { 00680 bool return_value = false; 00681 TAO_Expression_Type widest_type = 00682 TAO_Literal_Constraint::widest_type (left, right); 00683 00684 switch (widest_type) 00685 { 00686 case TAO_STRING: 00687 return_value = (ACE_OS::strcmp ((const char*) left, (const char*) right) > 0); 00688 break; 00689 case TAO_DOUBLE: 00690 return_value = (CORBA::Double) left > (CORBA::Double) right; 00691 break; 00692 case TAO_SIGNED: 00693 return_value = (CORBA::Long) left > (CORBA::Long) right; 00694 break; 00695 case TAO_UNSIGNED: 00696 return_value = (CORBA::ULong) left > (CORBA::ULong) right; 00697 break; 00698 } 00699 00700 return return_value; 00701 } |
|
Definition at line 704 of file Constraint_Nodes.cpp. References ACE_OS::strcmp(), TAO_DOUBLE, TAO_Expression_Type, TAO_SIGNED, TAO_STRING, TAO_UNSIGNED, and TAO_Literal_Constraint::widest_type().
00706 { 00707 bool return_value = false; 00708 TAO_Expression_Type widest_type = 00709 TAO_Literal_Constraint::widest_type (left, right); 00710 00711 switch (widest_type) 00712 { 00713 case TAO_STRING: 00714 return_value = (ACE_OS::strcmp ((const char*) left, (const char*) right) >= 0); 00715 break; 00716 case TAO_DOUBLE: 00717 return_value = (CORBA::Double) left >= (CORBA::Double) right; 00718 break; 00719 case TAO_SIGNED: 00720 return_value = (CORBA::Long) left >= (CORBA::Long) right; 00721 break; 00722 case TAO_UNSIGNED: 00723 return_value = (CORBA::ULong) left >= (CORBA::ULong) right; 00724 break; 00725 } 00726 00727 return return_value; 00728 } |
|
Definition at line 48 of file Constraint_Nodes.cpp. Referenced by TAO_Binary_Constraint::accept().
00050 { 00051 TAO_Binary_Constraint::visit_greater_than, 00052 TAO_Binary_Constraint::visit_greater_than_equal, 00053 TAO_Binary_Constraint::visit_less_than, 00054 TAO_Binary_Constraint::visit_less_than_equal, 00055 TAO_Binary_Constraint::visit_equal, 00056 TAO_Binary_Constraint::visit_not_equal, 00057 0, 00058 TAO_Binary_Constraint::visit_and, 00059 TAO_Binary_Constraint::visit_or, 00060 0, 00061 TAO_Binary_Constraint::visit_in, 00062 TAO_Binary_Constraint::visit_twiddle, 00063 0, 00064 TAO_Binary_Constraint::visit_add, 00065 TAO_Binary_Constraint::visit_sub, 00066 TAO_Binary_Constraint::visit_mult, 00067 TAO_Binary_Constraint::visit_div 00068 }; |