DGtal 1.3.0
Loading...
Searching...
No Matches
TraceWriter.h
1
17#pragma once
30#if defined(TraceWriter_RECURSES)
31#error Recursive header files inclusion detected in TraceWriter.h
32#else // defined(TraceWriter_RECURSES)
34#define TraceWriter_RECURSES
35
36#if !defined TraceWriter_h
38#define TraceWriter_h
39
41// Inclusions
42#include <iostream>
43#include <ostream>
45
46namespace DGtal
47{
48
50 // class TraceWriter
58 {
59 // ----------------------- Standard services ------------------------------
60 public:
61
62 // ----------------------- Interface --------------------------------------
63 public:
64
69 void selfDisplay( std::ostream & out ) const;
70
75 bool isValid() const;
76
77
78 virtual std::string prefixWarning() = 0;
79 virtual std::string prefixInfo() = 0;
80 virtual std::string prefixError() = 0;
81 virtual std::string prefixEmphase() = 0;
82 virtual std::string postfixReset() = 0;
83
84 std::ostream & outputStream() {return myOutputStream;};
85
86 // ------------------------- Protected Datas ------------------------------
87 protected:
88
90 std::ostream &myOutputStream;
91
92
93 // ------------------------- Private Datas --------------------------------
94 private:
95
96 // ------------------------- Hidden services ------------------------------
97 protected:
98
103 TraceWriter(std::ostream &aoutputStream) : myOutputStream(aoutputStream) {};
104
105
106
107
108 private:
109
115 TraceWriter( const TraceWriter & other );
116
124
125 // ------------------------- Internals ------------------------------------
126 private:
127
128 }; // end of class TraceWriter
129
130
137 std::ostream&
138 operator<<( std::ostream & out, const TraceWriter & object );
139
140
141} // namespace DGtal
142
143 //
145
146#endif // !defined TraceWriter_h
147
148#undef TraceWriter_RECURSES
149#endif // else defined(TraceWriter_RECURSES)
Virtual Class to implement trace writers.
Definition: TraceWriter.h:58
TraceWriter(std::ostream &aoutputStream)
Definition: TraceWriter.h:103
virtual std::string prefixError()=0
TraceWriter & operator=(const TraceWriter &other)
bool isValid() const
std::ostream & outputStream()
Definition: TraceWriter.h:84
virtual std::string postfixReset()=0
virtual std::string prefixEmphase()=0
virtual std::string prefixWarning()=0
std::ostream & myOutputStream
Reference to the output stream.
Definition: TraceWriter.h:90
TraceWriter(const TraceWriter &other)
virtual std::string prefixInfo()=0
void selfDisplay(std::ostream &out) const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)