#include <parse_string.hpp>
|
| concrete_struct () |
| Default constructor for the concrete object. Increments the reference count.
|
|
virtual | ~concrete_struct () |
| Virtual destructor for the concrete object. Decrements the reference count.
|
|
Definition at line 19 of file parse_string.hpp.
◆ parse_string_rep() [1/2]
parse_string_rep::parse_string_rep |
( |
| ) |
|
|
inline |
◆ parse_string_rep() [2/2]
parse_string_rep::parse_string_rep |
( |
string | s | ) |
|
|
inline |
◆ ~parse_string_rep()
parse_string_rep::~parse_string_rep |
( |
| ) |
|
|
inline |
◆ advance()
void parse_string_rep::advance |
( |
int | n | ) |
|
Definition at line 17 of file parse_string.cpp.
17 {
18 if (
is_nil (
l) || n <= 0)
return;
20 if (
p->item >=
N (
l->item)) {
21 n=
p->item -
N (
l->item);
25 }
26}
int N(array< T > a)
Get the length of the array.
◆ read()
string parse_string_rep::read |
( |
int | n | ) |
|
Definition at line 29 of file parse_string.cpp.
29 {
30 string s;
31 while (!
is_nil (
l) &&
p->item + n >
N (
l->item)) {
32 s <<
l->item (
p->item,
N (
l->item));
33 n-= (
N (
l->item) -
p->item);
36 }
38 s <<
l->item (
p->item,
p->item + n);
40 if (
p->item >=
N (
l->item)) {
43 }
44 return s;
45}
◆ write()
Definition at line 48 of file parse_string.cpp.
48 {
52 }
53}
The list class represents a linked list.
◆ get_char()
char parse_string_rep::get_char |
( |
int | n | ) |
|
Definition at line 56 of file parse_string.cpp.
56 {
58 if (
p->item + n <
N (
l->item))
return l->item[
p->item + n];
59
63 n-= (
N (
ll->item) -
pp->item);
66 }
68 return ll->item[
pp->item + n];
69}
◆ get_string()
string parse_string_rep::get_string |
( |
int | n | ) |
|
Definition at line 72 of file parse_string.cpp.
72 {
74 if (
p->item + n <=
N (
l->item))
return l->item (
p->item,
p->item + n);
75
76 string s;
81 s <<
ll->item (
pp->item,
pp->item +
m);
85 }
86 return s;
87}
SI min(SI i, SI j)
Returns the minimum of two signed integers.
◆ test()
bool parse_string_rep::test |
( |
string | s | ) |
|
Definition at line 90 of file parse_string.cpp.
90 {
92 if (
p->item +
N (s) <=
N (
l->item)) return ::test (
l->item,
p->item, s);
93
95}
◆ parse_string
◆ operator<<
Definition at line 102 of file parse_string.cpp.
103 {
107 out <<
l->item (
p->item,
N (
l->item));
110 }
111 return out;
112}
◆ test
list<int> parse_string_rep::p |
|
private |
The documentation for this class was generated from the following files: