Design Patterns
btree.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_BTREE_H_
7 #define STRUCTURAL_FLYWEIGHT_BTREE_H_
8 
9 #include "font.h"
10 
11 #include "../../../operational/src/iterator/list.h"
12 
13 namespace structural
14 {
15 namespace flyweight
16 {
17 class BTree
18 {
19  public:
20  BTree();
21  explicit BTree(long size);
22 
23  void Set(Font* font, const int& index, const int& span) const;
24  Font *Get(int index) const;
25 
26  private:
27  long size_;
28  int* nodes_;
30 };
31 }
32 }
33 
34 #endif
35 
Definition: shape_interface.h:11
Definition: list.h:17
Font * Get(int index) const
Definition: btree.cc:49
Definition: btree.h:17
Definition: font.h:15
void Set(Font *font, const int &index, const int &span) const
Definition: btree.cc:25
BTree()
Definition: btree.cc:23