#include <djv_links.h>
Public Types | |
| enum | Type { Empty = 0, Uri = 1, PageNumber = 2, Object = 3 } |
Public Member Functions | |
| Link () | |
| Link (const String &inHRef) | |
| Link (NULL_STRING null) | |
| Link (size_t inPageNumber) | |
| Link (const Chunk *inPageChunk) | |
| Link (const Link &inLink) | |
| Link & | operator= (const Link &inLink) |
| Link & | operator= (const String &inHRef) |
| Link & | operator= (size_t inPageNumber) |
| Link & | operator= (const Chunk *inPageChunk) |
| Link & | operator= (const NULL_STRING null) |
| void | setLink (const String &inHRef) |
| void | setLink (size_t inPageNumber) |
| void | setLink (const Chunk *inPageChunk) |
| bool | isEmptyLink () |
| Type | getType () const |
| size_t | getPageNumber (const Chunk *inDJVM=NULL) const |
| size_t | getPageChunkIndex (const Chunk *inDJVM) const |
Public Attributes | |
| String | href |
Definition at line 22 of file djv_links.h.
This enumeration is used to describe the type of the Link instance.
| Empty |
The link is empty.
href memeber is empty. |
| Uri |
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 |
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 |
Definition at line 36 of file djv_links.h.
| Celartem::DjVu::Link::Link | ( | ) | [inline] |
Initializes the instance without any parameters.
Definition at line 75 of file djv_links.h.
| Celartem::DjVu::Link::Link | ( | const String & | inHRef | ) | [inline] |
Initializes the instance with an URI.
| inHRef | Any kind of URI or a DjVu specific local links starts with #. |
Definition at line 85 of file djv_links.h.
| Celartem::DjVu::Link::Link | ( | NULL_STRING | null | ) | [inline] |
Initializes the instance with empty string.
| null | Always NullString. |
Definition at line 95 of file djv_links.h.
| Celartem::DjVu::Link::Link | ( | size_t | inPageNumber | ) | [inline] |
Initializes the instance with a page number.
| inPageNumber | Page number. |
Definition at line 104 of file djv_links.h.
| Celartem::DjVu::Link::Link | ( | const Chunk * | inPageChunk | ) | [inline] |
Initializes the instance with a Chunk which contains a page (DJVU).
| inPageChunk | Pointer to a Chunk of DJVU. |
Definition at line 115 of file djv_links.h.
| Celartem::DjVu::Link::Link | ( | const Link & | inLink | ) | [inline] |
Duplicates a Link instance.
| inLink | Link instance to duplicate. |
Definition at line 125 of file djv_links.h.
Copies a Link instance.
| inLink | Link instance to copy. |
Definition at line 135 of file djv_links.h.
Re-initializes the instance with an URI.
| inHRef | Any kind of URI or a DjVu specific local links starts with #. |
Definition at line 149 of file djv_links.h.
| Link& Celartem::DjVu::Link::operator= | ( | size_t | inPageNumber | ) | [inline] |
Re-initializes the instance with a page number.
| inPageNumber | Page number. |
Definition at line 162 of file djv_links.h.
Initializes the instance with a Chunk which contains a page (DJVU).
| inPageChunk | Pointer to a Chunk of DJVU. |
Definition at line 174 of file djv_links.h.
| Link& Celartem::DjVu::Link::operator= | ( | const NULL_STRING | null | ) | [inline] |
Re-initializes the instance with empty string.
| null | Always NullString. |
Definition at line 187 of file djv_links.h.
| void Celartem::DjVu::Link::setLink | ( | const String & | inHRef | ) | [inline] |
Sets an URI.
| inHRef | Any kind of URI or a DjVu specific local links starts with #. |
Definition at line 199 of file djv_links.h.
Referenced by Link(), and operator=().
| void Celartem::DjVu::Link::setLink | ( | size_t | inPageNumber | ) | [inline] |
Sets a page number.
| inPageNumber | Page number. |
Definition at line 209 of file djv_links.h.
| void Celartem::DjVu::Link::setLink | ( | const Chunk * | inPageChunk | ) |
| bool Celartem::DjVu::Link::isEmptyLink | ( | ) | [inline] |
Determines whether the link is empty or not.
true if the link is empty; otherwise false. Definition at line 226 of file djv_links.h.
| Type Celartem::DjVu::Link::getType | ( | ) | const [inline] |
| size_t Celartem::DjVu::Link::getPageNumber | ( | const Chunk * | inDJVM = NULL |
) | const |
| size_t Celartem::DjVu::Link::getPageChunkIndex | ( | const Chunk * | inDJVM | ) | const |
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.
Definition at line 30 of file djv_links.h.
Referenced by getType(), isEmptyLink(), operator=(), and setLink().