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

Env_Value_T.i

Go to the documentation of this file.
00001 // $Id: Env_Value_T.i,v 1.1.1.3 2001/12/04 14:33:00 chad Exp $
00002 
00003 template <class T> ACE_INLINE
00004 ACE_Env_Value<T>::operator T (void)
00005 {
00006   return value_;
00007 }
00008 
00009 template <class T> ACE_INLINE
00010 ACE_Env_Value<T>::ACE_Env_Value (void)
00011   : varname_ (0)
00012 {
00013 }
00014 
00015 template <class T> ACE_INLINE
00016 ACE_Env_Value<T>::ACE_Env_Value (const ACE_TCHAR *varname,
00017                                  const T &defval)
00018   : varname_ (varname),
00019     value_(defval)
00020 {
00021   this->fetch_value ();
00022 }
00023 
00024 template <class T> ACE_INLINE void
00025 ACE_Env_Value<T>::open (const ACE_TCHAR *varname,
00026                         const T &defval)
00027 {
00028   varname_ = varname;
00029   value_ = defval;
00030   this->fetch_value ();
00031 }
00032 
00033 template <class T> ACE_INLINE void
00034 ACE_Env_Value<T>::fetch_value (void)
00035 {
00036   const ACE_TCHAR *env = ACE_OS::getenv (varname_);
00037 
00038   if (env != 0)
00039     ACE_Convert (env, value_);
00040 }
00041 
00042 template <class T> ACE_INLINE const ACE_TCHAR*
00043 ACE_Env_Value<T>::varname (void) const
00044 {
00045   return varname_;
00046 }
00047 
00048 template <class T> ACE_INLINE
00049 ACE_Env_Value<T>::~ACE_Env_Value (void)
00050 {
00051 }

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