1 ////////////////////////////////////////////////////////////////////////////////
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
8 ////////////////////////////////////////////////////////////////////////////////
13 template<typename T, typename S>
14 std::string simple_ptr_to_string(const simple_ptr<T>& value,
16 const std::string& null_string,
17 const std::string& prefix,
18 const std::string& suffix)
20 return value ? (prefix + to_string_fn(*value) + suffix) : null_string;
23 template<typename T, typename S>
24 std::string simple_ptr_clone_to_string(const simple_ptr_clone<T>& value,
26 const std::string& null_string,
27 const std::string& prefix,
28 const std::string& suffix)
30 return value ? (prefix + to_string_fn(*value) + suffix) : null_string;
33 template<typename T, typename S>
34 std::string simple_ptr_nocopy_to_string(const simple_ptr_nocopy<T>& value,
36 const std::string& null_string,
37 const std::string& prefix,
38 const std::string& suffix)
40 return value ? (prefix + to_string_fn(*value) + suffix) : null_string;
43 } // end namespace stlplus