Design Patterns
glyph_factory.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_FLYWEIGHT_GLYPH_FACTORY_H_
7 #define STRUCTURAL_FLYWEIGHT_GLYPH_FACTORY_H_
8 
9 #include "character.h"
10 #include "column.h"
11 #include "row.h"
12 
13 namespace structural
14 {
15 namespace flyweight
16 {
18 {
19  public:
20  GlyphFactory();
21  virtual ~GlyphFactory();
22 
23  virtual Character *CreateCharacter(char);
24  virtual Row *CreateRow();
25  virtual Column *CreateColumn();
26 
27  private:
28  static const int kNumberCharCodes = 128;
29 
30  Character* character_[kNumberCharCodes];
31 };
32 }
33 }
34 
35 #endif
36 
Definition: shape_interface.h:11
GlyphFactory()
Definition: glyph_factory.cc:12
Definition: glyph_factory.h:17
Definition: row.h:15
virtual Column * CreateColumn()
Definition: glyph_factory.cc:37
virtual Character * CreateCharacter(char)
Definition: glyph_factory.cc:22
virtual ~GlyphFactory()
Definition: glyph_factory.cc:20
Definition: character.h:15
virtual Row * CreateRow()
Definition: glyph_factory.cc:32
Definition: column.h:17