3
//=============================================================================
5
* @file CE_Screen_Output.h
7
* CE_Screen_Output.h,v 1.4 2003/11/01 11:15:12 dhinton Exp
9
* @author Si Mong Park <spark@ociweb.com>
11
//=============================================================================
13
#ifndef ACE_CE_SCREEN_OUTPUT_H
14
#define ACE_CE_SCREEN_OUTPUT_H
16
#include "ace/config-all.h"
18
#if !defined (ACE_LACKS_PRAGMA_ONCE)
20
#endif /* ACE_LACKS_PRAGMA_ONCE */
22
#if defined (ACE_HAS_WINCE)
24
#include "ace/Log_Msg_Callback.h"
25
#include "ace/Log_Record.h"
27
const ACE_TCHAR endl[] = ACE_LIB_TEXT("\r\n");
28
const ACE_TCHAR tab[] = ACE_LIB_TEXT("\t");
31
* @class ACE_CE_Screen_Output
33
* @brief Replacement of text output for Windows CE.
35
* This class allows standard text output to be displayed on
36
* text window for Windows CE. Generally, all ACE output will
37
* go through under CE if and only if user uses WindozeCE
38
* implementation by using main_ce instead of main.
39
* Also, for the easier debugging purpose, object pointer of
40
* this class can be gotten from ACE_Log_Msg::msg_callback()
41
* and then can be used directly by user just like cout stream.
43
class ACE_Export ACE_CE_Screen_Output : public ACE_Log_Msg_Callback
47
ACE_CE_Screen_Output (HWND hEdit);
49
ACE_CE_Screen_Output (void);
51
virtual ~ACE_CE_Screen_Output();
53
/// Implementation of pure virtual function from ACE_Log_Msg_Callback.
54
virtual void log (ACE_Log_Record &log_record);
56
/// Interface to specify active window handle.
57
void SetOutputWindow (HWND hWnd);
61
/// Stream insertion operator that performs actual print out.
63
* @note This is the only one operator that performs output. All
64
* other perators convert the type and use this operator
67
ACE_CE_Screen_Output& operator << (ACE_TCHAR*);
68
ACE_CE_Screen_Output& operator << (const ACE_TCHAR*);
70
ACE_CE_Screen_Output& operator << (ACE_ANTI_TCHAR* output);
71
ACE_CE_Screen_Output& operator << (const ACE_ANTI_TCHAR* output);
73
ACE_CE_Screen_Output& operator << (char output);
74
ACE_CE_Screen_Output& operator << (unsigned char output);
76
ACE_CE_Screen_Output& operator << (unsigned short output);
78
ACE_CE_Screen_Output& operator << (int output);
79
ACE_CE_Screen_Output& operator << (unsigned int output);
81
ACE_CE_Screen_Output& operator << (float output);
83
ACE_CE_Screen_Output& operator << (long output);
84
ACE_CE_Screen_Output& operator << (unsigned long output);
86
ACE_CE_Screen_Output& operator << (FILE* pFile);
90
ACE_CE_Screen_Output(ACE_CE_Screen_Output&);
96
/// FILE pointer that used to save output to file. This class does
97
/// not own the file handler pointer.
101
#endif // ACE_HAS_WINCE
102
#endif // ACE_CE_SCREEN_OUTPUT_H