YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
ReadingList.h
浏览该文件的文档.
1 /*
2  © 2012-2013 FrankHB.
3 
4  This file is part of the YSLib project, and may only be used,
5  modified, and distributed under the terms of the YSLib project
6  license, LICENSE.TXT. By continuing to use, modify, or distribute
7  this file you indicate that you have read the license and
8  understand and accept it fully.
9 */
10 
28 #ifndef INC_YReader_ReadingList_h_
29 #define INC_YReader_ReadingList_h_ 1
30 
31 #include "Shells.h"
32 #include YFM_YSLib_Service_AccessHistory
33 
34 namespace YReader
35 {
36 
42 class Bookmark
43 {
44 public:
50 
54 
55  Bookmark(const IO::Path& path, size_t pos)
56  : Path(path), Position(pos)
57  {}
60 
62  explicit
63  operator ValueNode::Container() const;
64 };
65 
66 
71 inline bool
72 operator==(const Bookmark& x, const Bookmark& y)
73 {
74  return x.Path == y.Path && x.Position == y.Position;
75 }
76 
77 
82 using BookmarkList = vector<Bookmark::PositionType>;
83 
84 
90 class ReadingList : private GAccessList<Bookmark>, private noncopyable
91 {
92 public:
98 
99 public:
106 
107 
108  explicit
109  operator ValueNode::Container() const;
110 
111  // !\since build 404
114 
120 
126 
130  void
131  Insert(const IO::Path&, size_t);
132 
143 };
144 
145 } // namespace YReader;
146 
147 #endif
148 
set< ValueNode > Container
Definition: ValueNode.h:48
PositionType Position
Definition: ReadingList.h:53
#define DefDeCtor(_t)
Definition: YBaseMacro.h:131
#define DefDeCopyCtor(_t)
Definition: YBaseMacro.h:136
size_t PositionType
文件位置类型。
Definition: ReadingList.h:49
不可复制对象:禁止派生类调用默认原型的复制构造函数和复制赋值操作符。
Definition: utility.hpp:75
#define DefDeMoveCtor(_t)
Definition: YBaseMacro.h:141
书签。
Definition: ReadingList.h:42
值类型节点。
Definition: ValueNode.h:45
vector< Bookmark::PositionType > BookmarkList
书签列表类型。
Definition: ReadingList.h:82
Shell 框架逻辑。
阅读记录。
Definition: ReadingList.h:90
访问列表。
#define DefDelMoveCtor(_t)
Definition: YBaseMacro.h:143
Bookmark(const IO::Path &path, size_t pos)
Definition: ReadingList.h:55