summaryrefslogtreecommitdiff
path: root/ace/iosfwd.h
blob: 3845388024994b3fe2f4ade37144fc9691855de6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// -*- C++ -*-

//=============================================================================
/**
 *  @file    iosfwd.h
 *
 *  $Id$
 *
 *  @author Irfan Pyarali
 *
 *  This file contains the portability ugliness for the Standard C++
 *  Library.  As implementations of the "standard" emerge, this file
 *  will need to be updated.
 *
 *  This files deals with forward declaration for the stream
 *  classes.  Remember that since the new Standard C++ Library code
 *  for streams uses templates, simple forward declaration will not
 *  work.
 */
//=============================================================================


#ifndef ACE_IOSFWD_H
#define ACE_IOSFWD_H

#include "ace/pre.h"

#include "ace/config-all.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#if defined (ACE_HAS_STANDARD_CPP_LIBRARY)  && \
    (ACE_HAS_STANDARD_CPP_LIBRARY != 0)

# if !defined (ACE_USES_OLD_IOSTREAMS)  || \
    defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION)
#   include /**/ <iosfwd>
# endif /* ! ACE_USES_OLD_IOSTREAMS  ||  ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */

# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \
             (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0)

#   if !defined (ACE_USES_OLD_IOSTREAMS)
      // Make these available in the global name space
      using std::ios;
      using std::streambuf;
      using std::istream;
      using std::ostream;
      using std::iostream;
      using std::filebuf;
      using std::ifstream;
      using std::ofstream;
      using std::fstream;
#   endif /* ! ACE_USES_OLD_IOSTREAMS */

# elif defined (ACE_USES_OLD_IOSTREAMS) \
       && !defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION)

// NOTE: If these forward declarations don't work (e.g. aren't
//       portable), we may have to include "ace/streams.h" as a last
//       resort.  Doing so would defeat the purpose of this header,
//       unfortunately.

      class ios;
      class streambuf;
      class istream;
      class ostream;
      class iostream;
      class filebuf;
      class ifstream;
      class ofstream;
      class fstream;

# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */

#else /* ! ACE_HAS_STANDARD_CPP_LIBRARY */

  class ios;
  class streambuf;
  class istream;
  class ostream;
  class iostream;
  class filebuf;
  class ifstream;
  class ofstream;
  class fstream;

# endif /* ! ACE_HAS_STANDARD_CPP_LIBRARY */

#include "ace/post.h"

#endif /* ACE_IOSFWD_H */