PageLabel Class Documentation
classPageLabelNamespace:datalogics_interface
Detailed Description
PageLabel describes how to construct a label string for a range of pages. It contains information on number style, any prefixes, and a starting position within the document.
Note that a single PageLabel describes the label string for several pages all pages up until the first page covered by the next PageLabel, or the end of the document.
Also note that if a Document has any PageLabels, there must be one that starts at page index 0. This will be automatically created if the user does not supply one.
Referenced by
Uses types
Constructor & Destructor Documentation
PageLabel
PageLabel(const PageLabel &other)Parameters
other: const PageLabel &
Copy constructor.
PageLabel
PageLabel(intstart_page_index, NumberStylestyle)Parameters
start_page_index: intStarting page index in the Document for this range
style: NumberStyleNumbering style for this range
Public constructor
PageLabel
PageLabel(intstart_page_index, NumberStylestyle, const std::string &prefix, intfirst_number)Parameters
start_page_index: intStarting page index in the Document for this range
style: NumberStyleNumbering style for this range
prefix: const std::string &Prefix string for this range
first_number: intFirst number appearing on a page in this range
Public constructor
PageLabel
PageLabel(PageLabel &&)Parameters
~PageLabel
~PageLabel()Member Function Documentation
get_end_page_index
intget_end_page_index()Returns:
intYou cannot set the end index for a range; you must change the start index for the following range. A value of -1 means the end index for this PageLabel is unknown (e.g. when the label has not yet been added to a Document).
get_first_number_in_range
intget_first_number_in_range()Returns:
intMust be greater than or equal to 1.
get_number_style
NumberStyleget_number_style()Returns:
NumberStyleThe NumberStyle used for generating page labels in this range.
get_prefix
std::stringget_prefix()Returns:
std::stringFor example, a prefix of "A-" with decimal numbering starting at 1 would produce labels "A-1", "A-2", "A-3", etc.
get_start_page_index
intget_start_page_index()Returns:
intThe zero-based starting page index for this page label range in the Document.
operator=
PageLabel &operator=(const PageLabel &other)Parameters
other: const PageLabel &
Returns:
PageLabel &Copy assignment.
operator=
PageLabel &operator=(PageLabel &&)Parameters
Returns:
PageLabel &set_first_number_in_range
voidset_first_number_in_range(intnumber)Parameters
number: int
Returns:
voidThe first numeric value used for page labels in this range.
set_number_style
voidset_number_style(NumberStylestyle)Parameters
style: NumberStyle
Returns:
voidThe NumberStyle used for generating page labels in this range.
set_prefix
voidset_prefix(const std::string &prefix)Parameters
prefix: const std::string &
Returns:
voidThe prefix string prepended to page labels in this range.
set_start_page_index
voidset_start_page_index(intindex)Parameters
index: intthe zero-based starting page index for this page label range in the Document
Returns:
voidThe zero-based starting page index for this page label range in the Document.
to_string
std::stringto_string()Returns:
A string describing this PageLabel.The string includes the start page, end page, number style, prefix, and first page number of this label range.