libart-paperback 0.1.0-a.1.20260122225059.e5fea306241a
PDF (1.4) library for C++
document.hxx
1#ifndef art__paperback__document_hxx_
2#define art__paperback__document_hxx_
3
4#include <art/paperback/types.hxx>
5#include <art/paperback/forward.hxx>
6#include <art/paperback/page.hxx>
7
8namespace Art::Paperback
9{
10
12 {
13 public:
14 struct Create_new {};
15
16 /// Tag used to indicate the creation of a new document.
17 ///
18 static constexpr Create_new const create_new{};
19
20 /// Constructor.
21 ///
22 Document(Create_new const&, std::iostream&, int, int);
23
24 /// Destructor.
25 ///
26 ~Document();
27
28 /// Get document major version.
29 ///
30 int
31 major() const;
32
33 /// Get document minor version.
34 ///
35 int
36 minor() const;
37
38 /// Check that the document meets minimum version requirements.
39 ///
40 void
41 check_minimum_version(int, int) const;
42
43 /// Get document information.
44 ///
47
48 /// Create new page.
49 ///
50 Page&
52
53 /// Access the underlying COS file.
54 ///
56 file();
57
58 /// Flush current document state to output stream.
59 ///
60 void
61 flush();
62
63 private:
64 Document(Document const&) = delete;
65 Document(Document&&) = delete;
66 Document& operator=(Document const&) = delete;
67 Document& operator=(Document&&) = delete;
68
69 private:
70 struct Internal;
71 std::unique_ptr<Internal> internal;
72
73 };
74
75} // namespace Art::Paperback
76
77#endif
Represents a COS-format file.
Definition file.hxx:19
Definition document-information.hxx:11
static constexpr Create_new const create_new
Tag used to indicate the creation of a new document.
Definition document.hxx:18
Document_information & information()
Get document information.
Definition document.cxx:102
int minor() const
Get document minor version.
Definition document.cxx:78
Document(Create_new const &, std::iostream &, int, int)
Constructor.
Carousel::File & file()
Access the underlying COS file.
Definition document.cxx:129
void check_minimum_version(int, int) const
Check that the document meets minimum version requirements.
Definition document.cxx:89
~Document()
Destructor.
Definition document.cxx:64
void flush()
Flush current document state to output stream.
Definition document.cxx:136
int major() const
Get document major version.
Definition document.cxx:71
Page & create_page(Page::Properties const &)
Create new page.
Definition document.cxx:115
Definition page.hxx:12
Primary paperback namespace.
Definition array.cxx:6
Definition document.hxx:14
Definition document.cxx:27
Properties of a new page.
Definition page.hxx:20