Changeset 2277
- Timestamp:
- Mar 19, 2009, 9:19:14 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
-
build/msvc90/geos_unit/geos_unit.vcproj (modified) (1 diff)
-
tests/unit/capi/GEOSGeomFromWKBTest.cpp (added)
-
tests/unit/utility.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/build/msvc90/geos_unit/geos_unit.vcproj
r2265 r2277 453 453 </File> 454 454 <File 455 RelativePath="..\..\..\tests\unit\capi\GEOSGeomFromWKBTest.cpp" 456 > 457 </File> 458 <File 459 RelativePath="..\..\..\tests\unit\capi\GEOSGeomToWKTTest.cpp" 460 > 461 </File> 462 <File 463 RelativePath="..\..\..\tests\unit\capi\GEOSPolygonizer_getCutEdgesTest.cpp" 464 > 465 </File> 466 <File 455 467 RelativePath="..\..\..\tests\unit\capi\GEOSSimplifyTest.cpp" 456 468 > -
trunk/tests/unit/utility.h
r2162 r2277 29 29 #include <cstdlib> 30 30 #include <cassert> 31 #include <string> 32 #include <vector> 31 33 // tut 32 34 #include <tut.h> … … 216 218 } 217 219 220 // 221 // Utility functions 222 // 223 224 // Decodes hex-encoded WKB/EWKB to raw binary. 225 struct wkb_hex_decoder 226 { 227 typedef std::vector<unsigned char> binary_type; 228 229 // bytes [out] - buffer for binary output 230 static void decode(std::string const& hexstr, binary_type& bytes) 231 { 232 bytes.clear(); 233 for(std::string::size_type i = 0; i < hexstr.size() / 2; ++i) 234 { 235 std::istringstream iss(hexstr.substr(i * 2, 2)); 236 unsigned int n; 237 iss >> std::hex >> n; 238 bytes.push_back(static_cast<unsigned char>(n)); 239 } 240 } 241 }; 242 243 218 244 } // namespace tut 219 245
Note:
See TracChangeset
for help on using the changeset viewer.
