]> Dogcows Code - chaz/yoink/blob - src/stlplus/strings/string_address.cpp
build system enhancements
[chaz/yoink] / src / stlplus / strings / string_address.cpp
1 ////////////////////////////////////////////////////////////////////////////////
2
3 // Author: Andy Rushton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
7
8 // use the unsigned long representation for pointers
9
10 ////////////////////////////////////////////////////////////////////////////////
11 #include "string_address.hpp"
12 #include "string_int.hpp"
13 ////////////////////////////////////////////////////////////////////////////////
14
15 namespace stlplus
16 {
17
18 ////////////////////////////////////////////////////////////////////////////////
19
20 std::string address_to_string(const void* i, unsigned radix, radix_display_t display, unsigned width)
21 throw(std::invalid_argument)
22 {
23 return unsigned_long_to_string((unsigned long)i, radix, display, width);
24 }
25
26 ////////////////////////////////////////////////////////////////////////////////
27
28 void* string_to_address(const std::string& str, unsigned radix)
29 throw(std::invalid_argument)
30 {
31 return (void*)string_to_unsigned_long(str, radix);
32 }
33
34 ////////////////////////////////////////////////////////////////////////////////
35
36 } // end namespace stlplus
This page took 0.030886 seconds and 4 git commands to generate.