Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Env_Value_T.h File Reference

#include "ace/pre.h"
#include "ace/config-all.h"
#include "ace/OS.h"
#include "ace/post.h"

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.

Compounds

class  ACE_Env_Value
 Enviroment Variable Value. More...


Functions

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


Detailed Description

Id:
Env_Value_T.h,v 1.1.1.4 2003/02/21 18:36:32 chad 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

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

Definition at line 151 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS_String::strtod.

Referenced by ACE_Env_Value::fetch_value.

00152 {
00153   d = ACE_OS::strtod (s, 0);
00154 }

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

Definition at line 145 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS_String::strtoul.

00146 {
00147   ul = ACE_OS::strtoul (s, 0, 10);
00148 }

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

Definition at line 139 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS_String::strtol.

00140 {
00141   i = ACE_static_cast (int, ACE_OS::strtol (s, 0, 10));
00142 }

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

Definition at line 133 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS_String::strtol.

00134 {
00135   l = ACE_OS::strtol (s, 0, 10);
00136 }

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

Definition at line 126 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS_String::strtol.

00127 {
00128   i = ACE_static_cast (u_int,
00129                        ACE_OS::strtol (s, 0, 10));
00130 }

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

Definition at line 120 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS_String::strtol.

00121 {
00122   us = ACE_static_cast (u_short, ACE_OS::strtol (s, 0, 10));
00123 }

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

Definition at line 114 of file Env_Value_T.h.

References ACE_TCHAR, and ACE_OS_String::strtol.

00115 {
00116   si = ACE_static_cast (short, ACE_OS::strtol (s, 0, 10));
00117 }

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

Definition at line 108 of file Env_Value_T.h.

References ACE_TCHAR.

00109 {
00110   v = (const ACE_TCHAR *) s;
00111 }

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

Definition at line 102 of file Env_Value_T.h.

References ACE_TCHAR.

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

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

Definition at line 96 of file Env_Value_T.h.

References ACE_TCHAR.

00097 {
00098   t = T (s);
00099 }


Generated on Mon Jun 16 11:34:41 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002