Fixed typos
[ACE_TAO.git] / ACE / ace / CE_Screen_Output.h
blobf2497487d427a4443da06e5b8a4ba272b93dc693
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file CE_Screen_Output.h
7 * @author Si Mong Park <spark@ociweb.com>
8 */
9 //=============================================================================
11 #ifndef ACE_CE_SCREEN_OUTPUT_H
12 #define ACE_CE_SCREEN_OUTPUT_H
14 #include /**/ "ace/config-all.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 #pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #if defined (ACE_HAS_WINCE)
22 #include "ace/Log_Msg_Callback.h"
23 #include "ace/Log_Record.h"
25 namespace
27 const ACE_TCHAR endl[] = ACE_TEXT("\r\n");
28 const ACE_TCHAR tab[] = ACE_TEXT("\t");
31 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
33 /**
34 * @class ACE_CE_Screen_Output
36 * @brief Replacement of text output for Windows CE.
38 * This class allows standard text output to be displayed on
39 * text window for Windows CE. Generally, all ACE output will
40 * go through under CE if and only if user uses Windows CE
41 * implementation by using main_ce instead of main.
42 * Also, for the easier debugging purpose, object pointer of
43 * this class can be gotten from ACE_Log_Msg::msg_callback()
44 * and then can be used directly by user just like cout stream.
46 class ACE_Export ACE_CE_Screen_Output : public ACE_Log_Msg_Callback
48 public:
49 ACE_CE_Screen_Output (HWND hEdit);
51 ACE_CE_Screen_Output (void);
53 virtual ~ACE_CE_Screen_Output();
55 /// Implementation of pure virtual function from ACE_Log_Msg_Callback.
56 virtual void log (ACE_Log_Record &log_record);
58 /// Interface to specify active window handle.
59 void SetOutputWindow (HWND hWnd);
61 void clear (void);
63 /// Stream insertion operator that performs actual print out.
64 /**
65 * @note This is the only one operator that performs output. All
66 * other perators convert the type and use this operator
67 * underneath.
69 ACE_CE_Screen_Output& operator << (ACE_TCHAR*);
70 ACE_CE_Screen_Output& operator << (const ACE_TCHAR*);
72 ACE_CE_Screen_Output& operator << (ACE_ANTI_TCHAR* output);
73 ACE_CE_Screen_Output& operator << (const ACE_ANTI_TCHAR* output);
75 ACE_CE_Screen_Output& operator << (char output);
76 ACE_CE_Screen_Output& operator << (unsigned char output);
78 ACE_CE_Screen_Output& operator << (unsigned short output);
80 ACE_CE_Screen_Output& operator << (int output);
81 ACE_CE_Screen_Output& operator << (unsigned int output);
83 ACE_CE_Screen_Output& operator << (float output);
85 ACE_CE_Screen_Output& operator << (long output);
86 ACE_CE_Screen_Output& operator << (unsigned long output);
88 ACE_CE_Screen_Output& operator << (FILE* pFile);
90 private:
91 ACE_CE_Screen_Output (ACE_CE_Screen_Output&);
93 private:
94 HWND handler_;
96 /// FILE pointer that used to save output to file. This class does
97 /// not own the file handler pointer.
98 FILE* pFile_;
101 ACE_END_VERSIONED_NAMESPACE_DECL
103 #endif // ACE_HAS_WINCE
104 #endif // ACE_CE_SCREEN_OUTPUT_H