ACE_Argv_Type_Converter Class Reference

To convert 'char' input/command line parameter to 'wchar_t'. More...

#include <Argv_Type_Converter.h>

List of all members.

Public Member Functions

 ACE_Argv_Type_Converter (int &argc, char **argv)
 ACE_Argv_Type_Converter (int &argc, wchar_t **argv)
 ~ACE_Argv_Type_Converter (void)
ACE_TCHAR ** get_TCHAR_argv (void)
 Returns the pointer of converted command line.
char ** get_ASCII_argv (void)
 Returns the pointer of ASCII (char) command line.
wchar_t ** get_Wide_argv (void)
 Returns the pointer of Wide (wchar_t) command line.
int & get_argc (void)
 Returns the number of sub paramters (argc).

Private Member Functions

 ACE_Argv_Type_Converter (const ACE_Argv_Type_Converter &)
 Copy Constructor should not be used.
ACE_Argv_Type_Converter operator= (const ACE_Argv_Type_Converter &)
 Assignment '=' operator should not be used.
void initialize (void)
 Perform common initialization for two Ctor's.
void align_char_with_wchar (void)
void align_wchar_with_char (void)
void cleanup (void)
 Clean up removed (comsumed) argv entries and reset the pass flags.

Private Attributes

int & saved_argc_
 Original number of input paramter, same as 'argc'.
char ** char_argv_
 Data member pointer that contains converted argv in ACE_ANTI_TCHAR.
wchar_t ** wchar_argv_
 Data member pointer that contains converted argv in ACE_TCHAR.
int before_pass_argc_
 argc value before any argv has been passed.
const bool original_type_
bool wchar_passed_
 TRUE indicates wchar_t type argv has been passed.
bool char_passed_
 TRUE indicates char type argv has been passed.


Detailed Description

To convert 'char' input/command line parameter to 'wchar_t'.

This class is to convert 'char' type command line paramter to wide-character (wchar_t) format and stores the copy of it. This is useful for all classes that use 'char**' argv but cannot be converted into 'ACE_TCHAR**' version. Note that the converted data will be lost upon destruction, so classes should use this class as their data member.


Constructor & Destructor Documentation

ACE_Argv_Type_Converter::ACE_Argv_Type_Converter int &  argc,
char **  argv
 

ACE_Argv_Type_Converter::ACE_Argv_Type_Converter int &  argc,
wchar_t **  argv
 

ACE_Argv_Type_Converter::~ACE_Argv_Type_Converter void   ) 
 

ACE_Argv_Type_Converter::ACE_Argv_Type_Converter const ACE_Argv_Type_Converter  )  [private]
 

Copy Constructor should not be used.


Member Function Documentation

void ACE_Argv_Type_Converter::align_char_with_wchar void   )  [private]
 

Align all entries in the char type argv list with wchar_t type argv list.

void ACE_Argv_Type_Converter::align_wchar_with_char void   )  [private]
 

Align all entries in the wchar_t type argv list with char type argv list.

void ACE_Argv_Type_Converter::cleanup void   )  [private]
 

Clean up removed (comsumed) argv entries and reset the pass flags.

ACE_INLINE int & ACE_Argv_Type_Converter::get_argc void   ) 
 

Returns the number of sub paramters (argc).

ACE_INLINE char ** ACE_Argv_Type_Converter::get_ASCII_argv void   ) 
 

Returns the pointer of ASCII (char) command line.

ACE_INLINE ACE_TCHAR ** ACE_Argv_Type_Converter::get_TCHAR_argv void   ) 
 

Returns the pointer of converted command line.

wchar_t** ACE_Argv_Type_Converter::get_Wide_argv void   ) 
 

Returns the pointer of Wide (wchar_t) command line.

void ACE_Argv_Type_Converter::initialize void   )  [private]
 

Perform common initialization for two Ctor's.

ACE_Argv_Type_Converter ACE_Argv_Type_Converter::operator= const ACE_Argv_Type_Converter  )  [private]
 

Assignment '=' operator should not be used.


Member Data Documentation

int ACE_Argv_Type_Converter::before_pass_argc_ [private]
 

argc value before any argv has been passed.

char** ACE_Argv_Type_Converter::char_argv_ [private]
 

Data member pointer that contains converted argv in ACE_ANTI_TCHAR.

bool ACE_Argv_Type_Converter::char_passed_ [private]
 

TRUE indicates char type argv has been passed.

const bool ACE_Argv_Type_Converter::original_type_ [private]
 

FALSE represents original argv passed in is char, and TRUE represents wchar_t.

int& ACE_Argv_Type_Converter::saved_argc_ [private]
 

Original number of input paramter, same as 'argc'.

wchar_t** ACE_Argv_Type_Converter::wchar_argv_ [private]
 

Data member pointer that contains converted argv in ACE_TCHAR.

bool ACE_Argv_Type_Converter::wchar_passed_ [private]
 

TRUE indicates wchar_t type argv has been passed.


The documentation for this class was generated from the following files:
Generated on Wed Nov 23 15:47:44 2005 for ACE by  doxygen 1.4.5