YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
ReadingList.cpp
浏览该文件的文档.
1 /*
2  © 2012-2014 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 #include "ReadingList.h"
29 
30 namespace YReader
31 {
32 
33 Bookmark::operator ValueNode::Container() const
34 {
35  return {MakeNode("Path", string(Path)),
36  StringifyToNode("Position", Position)};
37 }
38 
39 
40 ReadingList::operator ValueNode::Container() const
41 {
43 
44  for(const auto& bm : GetList())
45  con.insert(MakeNode("bm" + to_string(con.size()),
47  return con;
48 }
49 
50 void
51 ReadingList::Insert(const IO::Path& pth, size_t pos)
52 {
53  Emplace(pth, pos);
54 }
55 
56 } // namespace YReader;
57 
set< ValueNode > Container
Definition: ValueNode.h:48
ValueNode StringifyToNode(_tString &&name, _tParams &&...args)
取指定名称和转换为字符串的值类型节点。
Definition: ValueNode.h:337
std::string to_string(unsigned char val)
转换为字符串。
Definition: string.hpp:353
阅读列表。
ValueNode MakeNode(_tString &&name, _tParams &&...args)
取指定名称和退化参数的值类型节点。
Definition: ValueNode.h:325