pdfobjects::utils::LinkAnnotInitializer Class Reference

#include <cannotation.h>

Inheritance diagram for pdfobjects::utils::LinkAnnotInitializer:
pdfobjects::utils::IAnnotInitializator

List of all members.

Public Member Functions

IAnnotInitializator::SupportedList getSupportedList () const
virtual bool operator() (boost::shared_ptr< CDict > &annotDict, std::string annotType)

Static Public Attributes

static std::string CONTENTS = "link"
static std::string DEST = ""
static std::string H = "N"

Detailed Description

Initializator for Link annotation.

Initializes link annotation. Default values for link specific annotation dictionary fields are stored in public static class fields and so can be changed be class user.


Member Function Documentation

IAnnotInitializator::SupportedList pdfobjects::utils::LinkAnnotInitializer::getSupportedList (  )  const [virtual]

Returns supported type.

Returns:
list with one element with Link type.

Implements pdfobjects::utils::IAnnotInitializator.

bool pdfobjects::utils::LinkAnnotInitializer::operator() ( boost::shared_ptr< CDict > &  annotDict,
std::string  annotType 
) [virtual]

Initializes Link annotation.

Parameters:
annotDict Annotation dictionary to initialize.
annotType Name of the annotation type to initialize (must be Link).

Checks if given annotType is Link and if yes, initializes given dictionary as Link annotation. Otherwise immediately returns with false.
Assumes that following entries are initialized: Type, P, Rect, M.
Initialization doesn't do any checking and so annotation dictioanries initialized to different type shouldn't be used here. Result may be incorrect annotation dictionary in such situation.

Returns:
true if initialization is successfull, false otherwise.

Implements pdfobjects::utils::IAnnotInitializator.

References pdfobjects::utils::checkAndReplace(), CONTENTS, DEST, pdfobjects::CObjectFactory< Type >::getInstance(), and H.


Member Data Documentation

Default value for Contents entry in Annotation dictionary. Value is empty string by default.

Referenced by operator()().

Default value for Dest entry in Annotation dictionary.

Referenced by operator()().

Default value for H (highlight mode) entry in Annotation dictionary.

Referenced by operator()().


The documentation for this class was generated from the following files: