ACE 7.0.6
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ACE_Env_Value< T > Class Template Reference

Environment Variable Value. More...

#include <Env_Value_T.h>

Inheritance diagram for ACE_Env_Value< T >:
Inheritance graph
[legend]
Collaboration diagram for ACE_Env_Value< T >:
Collaboration graph
[legend]

Public Member Functions

 ACE_Env_Value ()
 
 ACE_Env_Value (const ACE_TCHAR *varname, const T &vardefault)
 Constructor that calls open(). More...
 
 ~ACE_Env_Value ()
 Destroy the value. More...
 
 operator T ()
 Returns the value as type T. More...
 
void open (const ACE_TCHAR *varname, const T &defval)
 
const ACE_TCHARvarname () const
 Returns the name of the variable being tracked. More...
 

Private Member Functions

void fetch_value ()
 
- Private Member Functions inherited from ACE_Copy_Disabled
 ACE_Copy_Disabled ()
 Default constructor. More...
 

Private Attributes

const ACE_TCHARvarname_
 
value_
 

Detailed Description

template<class T>
class ACE_Env_Value< T >

Environment Variable Value.

Reads a variable from the user environment, providing a default value.

Constructor & Destructor Documentation

◆ ACE_Env_Value() [1/2]

template<class T >
ACE_Env_Value< T >::ACE_Env_Value
inline

Default constructor which isn't bound to a specific environment variable name or a default value. Before being useful it must open()'d.

◆ ACE_Env_Value() [2/2]

template<class T >
ACE_Env_Value< T >::ACE_Env_Value ( const ACE_TCHAR varname,
const T &  vardefault 
)
inline

Constructor that calls open().

◆ ~ACE_Env_Value()

template<class T >
ACE_Env_Value< T >::~ACE_Env_Value
inline

Destroy the value.

Member Function Documentation

◆ fetch_value()

template<class T >
void ACE_Env_Value< T >::fetch_value
inlineprivate

◆ open()

template<class T >
void ACE_Env_Value< T >::open ( const ACE_TCHAR varname,
const T &  defval 
)
inline

The constructor, read varname from the environment, using defval as its value if it is not defined.

◆ operator T()

template<class T >
ACE_Env_Value< T >::operator T
inline

Returns the value as type T.

◆ varname()

template<class T >
const ACE_TCHAR * ACE_Env_Value< T >::varname
inline

Returns the name of the variable being tracked.

Member Data Documentation

◆ value_

template<class T >
T ACE_Env_Value< T >::value_
private

◆ varname_

template<class T >
const ACE_TCHAR* ACE_Env_Value< T >::varname_
private

The documentation for this class was generated from the following files: