1 #ifndef MARISA_CELL_H_ 2 #define MARISA_CELL_H_ 3 4 #include "base.h" 5 6 namespace marisa { 7 8 class Cell { 9 public: Cell()10 Cell() : louds_pos_(0), node_(0), key_id_(0), length_(0) {} 11 set_louds_pos(UInt32 louds_pos)12 void set_louds_pos(UInt32 louds_pos) { 13 louds_pos_ = louds_pos; 14 } set_node(UInt32 node)15 void set_node(UInt32 node) { 16 node_ = node; 17 } set_key_id(UInt32 key_id)18 void set_key_id(UInt32 key_id) { 19 key_id_ = key_id; 20 } set_length(std::size_t length)21 void set_length(std::size_t length) { 22 length_ = length; 23 } 24 louds_pos()25 UInt32 louds_pos() const { 26 return louds_pos_; 27 } node()28 UInt32 node() const { 29 return node_; 30 } key_id()31 UInt32 key_id() const { 32 return key_id_; 33 } length()34 std::size_t length() const { 35 return length_; 36 } 37 38 private: 39 UInt32 louds_pos_; 40 UInt32 node_; 41 UInt32 key_id_; 42 std::size_t length_; 43 }; 44 } // namespace marisa 45 46 #endif // MARISA_CELL_H_ 47