blob: c4438d4767c2c1da0349d4dbe4b2d4fae0f64384 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
// file : examples/cxx/serializer/library/library-simpl-mixin.hxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#ifndef LIBRARY_SIMPL_HXX
#define LIBRARY_SIMPL_HXX
#include "library.hxx"
#include "library-sskel.hxx"
namespace library
{
//
//
struct isbn_simpl: virtual isbn_sskel, xml_schema::unsigned_int_simpl
{
virtual void
pre (isbn);
};
//
//
struct title_simpl: virtual title_sskel, xml_schema::string_simpl
{
virtual void
pre (const title&);
virtual bool
lang_present ();
virtual std::string
lang ();
private:
const title* title_;
};
//
//
struct genre_simpl: virtual genre_sskel, xml_schema::string_simpl
{
virtual void
pre (genre);
};
//
//
struct person_simpl: virtual person_sskel
{
virtual void
pre (const person&);
virtual std::string
name ();
virtual std::string
born ();
virtual bool
died_present ();
virtual std::string
died ();
private:
const person* person_;
};
//
//
struct author_simpl: virtual author_sskel, person_simpl
{
virtual void
pre (const author&);
virtual bool
recommends_present ();
virtual std::string
recommends ();
private:
const author* author_;
};
//
//
struct book_simpl: virtual book_sskel
{
virtual void
pre (const book&);
virtual library::isbn
isbn ();
virtual const library::title&
title ();
virtual library::genre
genre ();
virtual bool
author_next ();
virtual const library::author&
author ();
virtual bool
available ();
virtual std::string
id ();
private:
const book* book_;
book::authors::const_iterator ai_;
};
//
//
struct catalog_simpl: virtual catalog_sskel
{
virtual void
pre (const catalog&);
virtual bool
book_next ();
virtual const library::book&
book ();
private:
const catalog* catalog_;
catalog::const_iterator ci_;
};
}
#endif // LIBRARY_SIMPL_HXX
|