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

CE_Screen_Output.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    CE_Screen_Output.h
00006  *
00007  *  $Id: CE_Screen_Output.h,v 1.1.1.1 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Si Mong Park  <spark@ociweb.com>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef ACE_CE_SCREEN_OUTPUT_H
00014 #define ACE_CE_SCREEN_OUTPUT_H
00015 
00016 #include "ace/config-all.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 #pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 #if defined (ACE_HAS_WINCE)
00023 
00024 #include "ace/OS.h"
00025 #include "ace/Log_Msg_Callback.h"
00026 #include "ace/Log_Record.h"
00027 
00028 const ACE_TCHAR endl[] = ACE_LIB_TEXT("\r\n");
00029 const ACE_TCHAR tab[]  = ACE_LIB_TEXT("\t");
00030 
00031 /**
00032  * @class ACE_CE_Screen_Output
00033  *
00034  * @brief Replacement of text output for Windows CE.
00035  *
00036  * This class allows standard text output to be displayed on
00037  * text window for Windows CE.  Generally, all ACE output will
00038  * go through under CE if and only if user uses WindozeCE
00039  * implementation by using main_ce instead of main.
00040  * Also, for the easier debugging purpose, object pointer of
00041  * this class can be gotten from ACE_Log_Msg::msg_callback()
00042  * and then can be used directly by user just like cout stream.
00043  */
00044 class ACE_Export ACE_CE_Screen_Output : public ACE_Log_Msg_Callback
00045 {
00046 public:
00047 
00048   ACE_CE_Screen_Output (HWND hEdit);
00049 
00050   ACE_CE_Screen_Output (void);
00051 
00052   virtual ~ACE_CE_Screen_Output();
00053 
00054   /// Implementation of pure virtual function from ACE_Log_Msg_Callback.
00055   virtual void log (ACE_Log_Record &log_record);
00056 
00057   /// Interface to specify active window handle.
00058   void SetOutputWindow (HWND hWnd);
00059 
00060   void clear (void);
00061 
00062   /// Stream insertion operator that performs actual print out.
00063   /**
00064    * @note This is the only one operator that performs output.  All
00065    *       other perators convert the type and use this operator
00066    *       underneath.
00067    */
00068   ACE_CE_Screen_Output& operator << (ACE_TCHAR*);
00069   ACE_CE_Screen_Output& operator << (const ACE_TCHAR*);
00070 
00071   ACE_CE_Screen_Output& operator << (ACE_ANTI_TCHAR* output);
00072   ACE_CE_Screen_Output& operator << (const ACE_ANTI_TCHAR* output);
00073 
00074   ACE_CE_Screen_Output& operator << (char output);
00075   ACE_CE_Screen_Output& operator << (unsigned char output);
00076 
00077   ACE_CE_Screen_Output& operator << (unsigned short output);
00078 
00079   ACE_CE_Screen_Output& operator << (int output);
00080   ACE_CE_Screen_Output& operator << (unsigned int output);
00081 
00082   ACE_CE_Screen_Output& operator << (float output);
00083 
00084   ACE_CE_Screen_Output& operator << (long output);
00085   ACE_CE_Screen_Output& operator << (unsigned long output);
00086 
00087   ACE_CE_Screen_Output& operator << (FILE* pFile);
00088 
00089 private:
00090 
00091   ACE_CE_Screen_Output(ACE_CE_Screen_Output&);
00092 
00093 private:
00094 
00095   HWND handler_;
00096 
00097   /// FILE pointer that used to save output to file.  This class does
00098   /// not own the file handler pointer.
00099   FILE* pFile_;
00100 };
00101 
00102 #endif  // ACE_HAS_WINCE
00103 #endif  // ACE_CE_SCREEN_OUTPUT_H

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