| 111 | | if (oid==23) //int4 |
| 112 | | { |
| 113 | | int val = int4net(buf); |
| 114 | | boost::put(*feature,name,val); |
| 115 | | } |
| 116 | | else if (oid==21) //int2 |
| 117 | | { |
| 118 | | int val = int2net(buf); |
| 119 | | boost::put(*feature,name,val); |
| 120 | | } |
| 121 | | else if (oid == 700) // float4 |
| 122 | | { |
| 123 | | float val; |
| 124 | | float4net(val,buf); |
| 125 | | boost::put(*feature,name,val); |
| 126 | | } |
| 127 | | else if (oid == 701) // float8 |
| 128 | | { |
| 129 | | double val; |
| 130 | | float8net(val,buf); |
| 131 | | boost::put(*feature,name,val); |
| 132 | | } |
| 133 | | else if (oid==25 || oid==1042 || oid==1043) // text or bpchar or varchar |
| 134 | | { |
| 135 | | //std::string str(buf); |
| 136 | | //trim(str); |
| 137 | | //std::wstring wstr = tr_->transcode(str); |
| 138 | | UnicodeString ustr = tr_->transcode(buf); |
| 139 | | boost::put(*feature,name,ustr); |
| 140 | | } |
| 141 | | else if (oid == 1700) // numeric |
| 142 | | { |
| 143 | | std::string str = numeric2string(buf); |
| 144 | | try |
| | 114 | if (oid==23) //int4 |
| 153 | | } |
| 154 | | else |
| 155 | | { |
| | 124 | else if (oid == 700) // float4 |
| | 125 | { |
| | 126 | float val; |
| | 127 | float4net(val,buf); |
| | 128 | boost::put(*feature,name,val); |
| | 129 | } |
| | 130 | else if (oid == 701) // float8 |
| | 131 | { |
| | 132 | double val; |
| | 133 | float8net(val,buf); |
| | 134 | boost::put(*feature,name,val); |
| | 135 | } |
| | 136 | else if (oid==25 || oid==1042 || oid==1043) // text or bpchar or varchar |
| | 137 | { |
| | 138 | //std::string str(buf); |
| | 139 | //trim(str); |
| | 140 | //std::wstring wstr = tr_->transcode(str); |
| | 141 | UnicodeString ustr = tr_->transcode(buf); |
| | 142 | boost::put(*feature,name,ustr); |
| | 143 | } |
| | 144 | else if (oid == 1700) // numeric |
| | 145 | { |
| | 146 | std::string str = numeric2string(buf); |
| | 147 | try |
| | 148 | { |
| | 149 | double val = boost::lexical_cast<double>(str); |
| | 150 | boost::put(*feature,name,val); |
| | 151 | } |
| | 152 | catch (boost::bad_lexical_cast & ex) |
| | 153 | { |
| | 154 | std::clog << ex.what() << "\n"; |
| | 155 | } |
| | 156 | } |
| | 157 | else |
| | 158 | { |