#include <djv_links.h>
This class defines link structure used by Bookmark and MapArea classes.
This enumeration is used to describe the type of the Link instance.
Enumerator |
---|
Empty |
The link is empty.
href memeber is empty.
|
Uri |
The link is by an URL.
Any kind of the URIs can be acceptable even if it is supported by the platform which runs the DjVu applications. The method does not verify the actual content of the URL but confirms that it's not starting from # .
|
PageNumber |
The link is by a page number.
href contains a number prefixed by a # . For example, link to the cover page is represented as "#0001" .
This link is linked to the page literally indicated by the page number.
|
Object |
The link is to a page or an object.
href contains an internal identifier prefixed by a # .
This link is linked to either a page or an object. Please note that this type of link is "literally" distinguished from PageNumber by assuming that the identifiers do not start from numeric characters; they should not start from numeric characters.
|
Celartem::DjVu::Link::Link |
( |
| ) |
|
|
inline |
Initializes the instance without any parameters.
Celartem::DjVu::Link::Link |
( |
const String & |
inHRef | ) |
|
|
inline |
Initializes the instance with an URI.
- Parameters
-
inHRef | Any kind of URI or a DjVu specific local links starts with # . |
Initializes the instance with empty string.
- Parameters
-
Celartem::DjVu::Link::Link |
( |
size_t |
inPageNumber | ) |
|
|
inline |
Initializes the instance with a page number.
- Parameters
-
Celartem::DjVu::Link::Link |
( |
const Chunk * |
inPageChunk | ) |
|
|
inline |
Initializes the instance with a Chunk which contains a page (DJVU
).
- Parameters
-
inPageChunk | Pointer to a Chunk of DJVU . |
Celartem::DjVu::Link::Link |
( |
const Link & |
inLink | ) |
|
|
inline |
Duplicates a Link instance.
- Parameters
-
inLink | Link instance to duplicate. |
String Celartem::DjVu::Link::getCanonicalizedHref |
( |
| ) |
const |
Returns canonicalized link.
This method is mainly to deal with invalid relative page links generated by some versions of DjVu Editor.
- Returns
- Canonicalized link.
size_t Celartem::DjVu::Link::getPageChunkIndex |
( |
const Chunk * |
inDJVM | ) |
const |
Returns the index of the Chunk which corresponds to the page. param inDJVM Chunk of DJVM
which the link is applied for.
- Returns
- Returns valid page index if succeeded; otherwise returns notFound.
size_t Celartem::DjVu::Link::getPageNumber |
( |
const Chunk * |
inDJVM = NULL | ) |
const |
Returns the page number (start from 1) of the specified page.
- Parameters
-
inDJVM | If the Type of this link is Page, the page number cannot be determined without DJVM chunk instance.
In other cases, it can be NULL . |
- Returns
- Returns valid page number if succeeded; otherwise returns 0.
Type Celartem::DjVu::Link::getType |
( |
| ) |
const |
|
inline |
Returns the type of the Link based on the href value.
- Returns
- The returned value is one of the Type values.
- See Also
- Type.
bool Celartem::DjVu::Link::isEmptyLink |
( |
| ) |
const |
|
inline |
Determines whether the link is empty or not.
- Returns
true
if the link is empty; otherwise false
.
Link& Celartem::DjVu::Link::operator= |
( |
const Link & |
inLink | ) |
|
|
inline |
Copies a Link instance.
- Parameters
-
inLink | Link instance to copy. |
Link& Celartem::DjVu::Link::operator= |
( |
const String & |
inHRef | ) |
|
|
inline |
Re-initializes the instance with an URI.
- Parameters
-
inHRef | Any kind of URI or a DjVu specific local links starts with # . |
- Returns
- Reference to this instance.
Link& Celartem::DjVu::Link::operator= |
( |
size_t |
inPageNumber | ) |
|
|
inline |
Re-initializes the instance with a page number.
- Parameters
-
- Returns
- Reference to this instance.
Link& Celartem::DjVu::Link::operator= |
( |
const Chunk * |
inPageChunk | ) |
|
|
inline |
Initializes the instance with a Chunk which contains a page (DJVU
).
- Parameters
-
inPageChunk | Pointer to a Chunk of DJVU . |
Re-initializes the instance with empty string.
- Parameters
-
- Returns
- Reference to this instance.
void Celartem::DjVu::Link::setLink |
( |
const String & |
inHRef | ) |
|
|
inline |
Sets an URI.
- Parameters
-
inHRef | Any kind of URI or a DjVu specific local links starts with # . |
Referenced by Link(), and operator=().
void Celartem::DjVu::Link::setLink |
( |
size_t |
inPageNumber | ) |
|
|
inline |
Sets a page number.
- Parameters
-
void Celartem::DjVu::Link::setLink |
( |
const Chunk * |
inPageChunk | ) |
|
Sets a Chunk which contains a page (DJVU
).
- Parameters
-
inPageChunk | Pointer to a Chunk of DJVU . |
String Celartem::DjVu::Link::href |
This can be any kind of URI usually used with Internet browsers or a special type of links which is privately defined by a DjVu file. See Type, for more information.
Referenced by getType(), isEmptyLink(), operator=(), and setLink().
The documentation for this class was generated from the following file: