summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-03-01 09:47:33 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-03-01 09:47:33 +0000
commitaf8dfb5a2dc34ef68be3cc206612664ff923bedb (patch)
tree58ed6536cdd651d677fef5c0d12a729a82f89a26
parente12bdbe92c5f5f0a5008a1f554be5ef3780b77ea (diff)
downloadATCD-af8dfb5a2dc34ef68be3cc206612664ff923bedb.tar.gz
ChangelogTag: Wed Mar 1 07:36:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--ace/Env_Value_T.h41
1 files changed, 20 insertions, 21 deletions
diff --git a/ace/Env_Value_T.h b/ace/Env_Value_T.h
index 42735b42ef7..0a01705dfbb 100644
--- a/ace/Env_Value_T.h
+++ b/ace/Env_Value_T.h
@@ -91,72 +91,71 @@ ACE_END_VERSIONED_NAMESPACE_DECL
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-// Default calls a CTOR on type T of the form 'T::T(const char*)', but
-// users can feel free to create their own specialized conversion
-// functions if necessary, as shown below. Note that for 'char*' the
-// default is used because a simple cast will be performed and no
-// conversion will be necessary.
-
-template <class T> inline void
-ACE_Convert (const ACE_TCHAR *s, T &t)
-{
- t = T (s);
-}
-
-inline void
+template <> inline void
ACE_Convert (const ACE_TCHAR *s, ACE_TCHAR *&v)
{
v = (ACE_TCHAR *) s;
}
-inline void
+template <> inline void
ACE_Convert (const ACE_TCHAR *s, const ACE_TCHAR *&v)
{
v = (const ACE_TCHAR *) s;
}
-inline void
+template <> inline void
ACE_Convert (const ACE_TCHAR *s, short &si)
{
si = static_cast<short> (ACE_OS::strtol (s, 0, 10));
}
-inline void
+template <> inline void
ACE_Convert (const ACE_TCHAR *s, u_short &us)
{
us = static_cast <u_short> (ACE_OS::strtol (s, 0, 10));
}
-inline void
+template <> inline void
ACE_Convert (const ACE_TCHAR *s, u_int &i)
{
i = static_cast<u_int> (ACE_OS::strtol (s, 0, 10));
}
-inline void
+template <> inline void
ACE_Convert (const ACE_TCHAR *s, long &l)
{
l = ACE_OS::strtol (s, 0, 10);
}
-inline void
+template <> inline void
ACE_Convert (const ACE_TCHAR *s, int &i)
{
i = static_cast<int> (ACE_OS::strtol (s, 0, 10));
}
-inline void
+template <> inline void
ACE_Convert (const ACE_TCHAR *s, u_long &ul)
{
ul = ACE_OS::strtoul (s, 0, 10);
}
-inline void
+template <> inline void
ACE_Convert (const ACE_TCHAR *s, double &d)
{
d = ACE_OS::strtod (s, 0);
}
+// Default calls a CTOR on type T of the form 'T::T(const char*)', but
+// users can feel free to create their own specialized conversion
+// functions if necessary, as shown above. Note that for 'char*' the
+// default is used because a simple cast will be performed and no
+// conversion will be necessary.
+template <class T> inline void
+ACE_Convert (const ACE_TCHAR *s, T &t)
+{
+ t = T (s);
+}
+
ACE_END_VERSIONED_NAMESPACE_DECL
#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)