Env_Value_T.h File Reference

#include "ace/config-all.h"
#include "ace/Global_Macros.h"
#include "ace/OS_NS_stdlib.h"
#include "ace/Env_Value_T.inl"
#include "ace/Env_Value_T.cpp"

Include dependency graph for Env_Value_T.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class  ACE_Env_Value
 Environment Variable Value. More...


Functions

template<class T> void ACE_Convert (const ACE_TCHAR *s, T &t)
 Function to convert a string s into type T.

template<> ACE_END_VERSIONED_NAMESPACE_DECL
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
void 
ACE_Convert (const ACE_TCHAR *s, ACE_TCHAR *&v)
template<> void ACE_Convert (const ACE_TCHAR *s, const ACE_TCHAR *&v)
template<> void ACE_Convert (const ACE_TCHAR *s, short &si)
template<> void ACE_Convert (const ACE_TCHAR *s, u_short &us)
template<> void ACE_Convert (const ACE_TCHAR *s, u_int &i)
template<> void ACE_Convert (const ACE_TCHAR *s, long &l)
template<> void ACE_Convert (const ACE_TCHAR *s, int &i)
template<> void ACE_Convert (const ACE_TCHAR *s, u_long &ul)
template<> void ACE_Convert (const ACE_TCHAR *s, double &d)


Detailed Description

Env_Value_T.h,v 4.32 2006/03/01 09:47:33 jwillemsen Exp

Template to encapsulate getting a value from an environment variable and using a supplied default value if not in the environment.

Author:
Chris Cleeland (derived from work by Carlos O'Ryan)

Definition in file Env_Value_T.h.


Function Documentation

template<>
void ACE_Convert const ACE_TCHAR s,
double &  d
[inline]
 

Definition at line 143 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS::strtod().

Referenced by ACE_Env_Value< T >::fetch_value().

00144 {
00145   d = ACE_OS::strtod (s, 0);
00146 }

template<>
void ACE_Convert const ACE_TCHAR s,
u_long &  ul
[inline]
 

Definition at line 137 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS::strtoul().

00138 {
00139   ul = ACE_OS::strtoul (s, 0, 10);
00140 }

template<>
void ACE_Convert const ACE_TCHAR s,
int &  i
[inline]
 

Definition at line 131 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS::strtol().

00132 {
00133   i = static_cast<int> (ACE_OS::strtol (s, 0, 10));
00134 }

template<>
void ACE_Convert const ACE_TCHAR s,
long &  l
[inline]
 

Definition at line 125 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS::strtol().

00126 {
00127   l = ACE_OS::strtol (s, 0, 10);
00128 }

template<>
void ACE_Convert const ACE_TCHAR s,
u_int &  i
[inline]
 

Definition at line 119 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS::strtol().

00120 {
00121   i = static_cast<u_int> (ACE_OS::strtol (s, 0, 10));
00122 }

template<>
void ACE_Convert const ACE_TCHAR s,
u_short &  us
[inline]
 

Definition at line 113 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS::strtol().

00114 {
00115   us = static_cast <u_short> (ACE_OS::strtol (s, 0, 10));
00116 }

template<>
void ACE_Convert const ACE_TCHAR s,
short &  si
[inline]
 

Definition at line 107 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS::strtol().

00108 {
00109   si = static_cast<short> (ACE_OS::strtol (s, 0, 10));
00110 }

template<>
void ACE_Convert const ACE_TCHAR s,
const ACE_TCHAR *&  v
[inline]
 

Definition at line 101 of file Env_Value_T.h.

References ACE_TCHAR, and v.

00102 {
00103   v = (const ACE_TCHAR *) s;
00104 }

template<>
ACE_END_VERSIONED_NAMESPACE_DECL ACE_BEGIN_VERSIONED_NAMESPACE_DECL void ACE_Convert const ACE_TCHAR s,
ACE_TCHAR *&  v
[inline]
 

Definition at line 95 of file Env_Value_T.h.

References ACE_TCHAR, and v.

00096 {
00097   v = (ACE_TCHAR *) s;
00098 }

template<class T>
void ACE_Convert const ACE_TCHAR s,
T &  t
[inline]
 

Function to convert a string s into type T.

Definition at line 154 of file Env_Value_T.h.

References ACE_TCHAR.

00155 {
00156   t = T (s);
00157 }


Generated on Thu Nov 9 10:10:32 2006 for ACE by doxygen 1.3.6