Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
olena
Commits
92e2d041
Commit
92e2d041
authored
Nov 16, 2010
by
Guillaume Lazzara
Browse files
scribo/core/document.hh: Add new methods.
parent
4c97de45
Changes
2
Hide whitespace changes
Inline
Side-by-side
scribo/ChangeLog
View file @
92e2d041
2010-11-16 Guillaume Lazzara <z@lrde.epita.fr>
* scribo/core/document.hh: Add new methods.
2010-11-16 Guillaume Lazzara <z@lrde.epita.fr>
* scribo/io/xml/save.hh: Add conditions before saving elements and
...
...
scribo/scribo/core/document.hh
View file @
92e2d041
...
...
@@ -48,21 +48,24 @@ namespace scribo
document
();
document
(
const
char
*
filename
);
void
open
();
const
char
*
filename
()
const
;
void
set_filename
(
const
char
*
name
);
bool
is_valid
()
const
;
const
line_set
<
L
>&
text
()
const
;
bool
has_text
()
const
;
void
set_text
(
const
line_set
<
L
>&
line
);
const
component_set
<
L
>&
elements
()
const
;
bool
has_elements
()
const
;
void
set_elements
(
const
component_set
<
L
>&
elements
);
const
mln
::
image2d
<
value
::
rgb8
>&
image
()
const
;
private:
void
open
();
const
char
*
filename_
;
mln
::
image2d
<
mln
::
value
::
rgb8
>
image_
;
...
...
@@ -97,6 +100,14 @@ namespace scribo
}
template
<
typename
L
>
void
document
<
L
>::
set_filename
(
const
char
*
filename
)
{
filename_
=
filename
;
}
template
<
typename
L
>
void
document
<
L
>::
open
()
...
...
@@ -121,6 +132,14 @@ namespace scribo
}
template
<
typename
L
>
bool
document
<
L
>::
has_text
()
const
{
return
lines_
.
is_valid
();
}
template
<
typename
L
>
void
document
<
L
>::
set_text
(
const
line_set
<
L
>&
line
)
...
...
@@ -137,6 +156,14 @@ namespace scribo
}
template
<
typename
L
>
bool
document
<
L
>::
has_elements
()
const
{
return
elements_
.
is_valid
();
}
template
<
typename
L
>
void
document
<
L
>::
set_elements
(
const
component_set
<
L
>&
elements
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment