~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to ace/CE_Screen_Output.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- C++ -*-
2
 
 
3
 
//=============================================================================
4
 
/**
5
 
 *  @file    CE_Screen_Output.h
6
 
 *
7
 
 *  CE_Screen_Output.h,v 1.4 2003/11/01 11:15:12 dhinton Exp
8
 
 *
9
 
 *  @author Si Mong Park  <spark@ociweb.com>
10
 
 */
11
 
//=============================================================================
12
 
 
13
 
#ifndef ACE_CE_SCREEN_OUTPUT_H
14
 
#define ACE_CE_SCREEN_OUTPUT_H
15
 
 
16
 
#include "ace/config-all.h"
17
 
 
18
 
#if !defined (ACE_LACKS_PRAGMA_ONCE)
19
 
#pragma once
20
 
#endif /* ACE_LACKS_PRAGMA_ONCE */
21
 
 
22
 
#if defined (ACE_HAS_WINCE)
23
 
 
24
 
#include "ace/Log_Msg_Callback.h"
25
 
#include "ace/Log_Record.h"
26
 
 
27
 
const ACE_TCHAR endl[] = ACE_LIB_TEXT("\r\n");
28
 
const ACE_TCHAR tab[]  = ACE_LIB_TEXT("\t");
29
 
 
30
 
/**
31
 
 * @class ACE_CE_Screen_Output
32
 
 *
33
 
 * @brief Replacement of text output for Windows CE.
34
 
 *
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.
42
 
 */
43
 
class ACE_Export ACE_CE_Screen_Output : public ACE_Log_Msg_Callback
44
 
{
45
 
public:
46
 
 
47
 
  ACE_CE_Screen_Output (HWND hEdit);
48
 
 
49
 
  ACE_CE_Screen_Output (void);
50
 
 
51
 
  virtual ~ACE_CE_Screen_Output();
52
 
 
53
 
  /// Implementation of pure virtual function from ACE_Log_Msg_Callback.
54
 
  virtual void log (ACE_Log_Record &log_record);
55
 
 
56
 
  /// Interface to specify active window handle.
57
 
  void SetOutputWindow (HWND hWnd);
58
 
 
59
 
  void clear (void);
60
 
 
61
 
  /// Stream insertion operator that performs actual print out.
62
 
  /**
63
 
   * @note This is the only one operator that performs output.  All
64
 
   *       other perators convert the type and use this operator
65
 
   *       underneath.
66
 
   */
67
 
  ACE_CE_Screen_Output& operator << (ACE_TCHAR*);
68
 
  ACE_CE_Screen_Output& operator << (const ACE_TCHAR*);
69
 
 
70
 
  ACE_CE_Screen_Output& operator << (ACE_ANTI_TCHAR* output);
71
 
  ACE_CE_Screen_Output& operator << (const ACE_ANTI_TCHAR* output);
72
 
 
73
 
  ACE_CE_Screen_Output& operator << (char output);
74
 
  ACE_CE_Screen_Output& operator << (unsigned char output);
75
 
 
76
 
  ACE_CE_Screen_Output& operator << (unsigned short output);
77
 
 
78
 
  ACE_CE_Screen_Output& operator << (int output);
79
 
  ACE_CE_Screen_Output& operator << (unsigned int output);
80
 
 
81
 
  ACE_CE_Screen_Output& operator << (float output);
82
 
 
83
 
  ACE_CE_Screen_Output& operator << (long output);
84
 
  ACE_CE_Screen_Output& operator << (unsigned long output);
85
 
 
86
 
  ACE_CE_Screen_Output& operator << (FILE* pFile);
87
 
 
88
 
private:
89
 
 
90
 
  ACE_CE_Screen_Output(ACE_CE_Screen_Output&);
91
 
 
92
 
private:
93
 
 
94
 
  HWND handler_;
95
 
 
96
 
  /// FILE pointer that used to save output to file.  This class does
97
 
  /// not own the file handler pointer.
98
 
  FILE* pFile_;
99
 
};
100
 
 
101
 
#endif  // ACE_HAS_WINCE
102
 
#endif  // ACE_CE_SCREEN_OUTPUT_H