Design Patterns
compressing_stream.h
Go to the documentation of this file.
1 // Based on "Design Patterns: Elements of Reusable Object-Oriented Software"
2 // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
3 //
4 // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan.
5 
6 #ifndef STRUCTURAL_DECORATOR_COMPRESSING_STREAM_DECORATOR_H_
7 #define STRUCTURAL_DECORATOR_COMPRESSING_STREAM_DECORATOR_H_
8 
9 #include "stream_decorator.h"
10 
11 namespace structural
12 {
13 namespace decorator
14 {
16 {
17  public:
19 
20  void PutInt(int) override;
21  void PutString(const std::string&) override;
22 
23  int value() const;
24  std::string &message();
25 
26  private:
27  int value_;
28  std::string text_string_;
29 };
30 }
31 }
32 
33 #endif
34 
Definition: shape_interface.h:11
void PutInt(int) override
Definition: compressing_stream.cc:16
CompressingStream(StreamInterface *)
Definition: compressing_stream.cc:14
Definition: compressing_stream.h:15
void PutString(const std::string &) override
Definition: compressing_stream.cc:22
std::string & message()
Definition: compressing_stream.cc:36
Definition: stream_decorator.h:15
Definition: stream_interface.h:15
int value() const
Definition: compressing_stream.cc:31