pdfobjects::utils::TextAnnotInitializer Class Reference

#include <cannotation.h>

Inheritance diagram for pdfobjects::utils::TextAnnotInitializer:
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 bool OPEN = true
static std::string CONTENTS = ""
static std::string NAME = "Comment"
static std::string STATE = "Unmarked"
static std::string STATEMODEL = "Marked"
static int FLAGS = 0

Detailed Description

Initializator for Text annotation.

Initializes text annotation. Default values for text 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::TextAnnotInitializer::getSupportedList (  )  const [virtual]

Returns supported type.

Returns:
list with one element with Text type.

Implements pdfobjects::utils::IAnnotInitializator.

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

Initializes text annotation.

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

Checks if given annotType is Text and if yes, initializes given dictionary as Text 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, FLAGS, pdfobjects::CObjectFactory< Type >::getInstance(), NAME, OPEN, STATE, and STATEMODEL.


Member Data Documentation

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

Referenced by operator()().

Default value for F entry in Annotation dictionary.

Referenced by operator()().

string pdfobjects::utils::TextAnnotInitializer::NAME = "Comment" [static]

Default value for Name entry in Annotation dictionary. Value is Comment by default.

Referenced by operator()().

Default value for Open entry in Annotation dictionary. Value is true by default.

Referenced by operator()().

string pdfobjects::utils::TextAnnotInitializer::STATE = "Unmarked" [static]

Default value for State entry in Annotation dictionary. Value is Unmarked by default.

Referenced by operator()().

Default value for StateModel entry in Annotation dictionary. Value is Marked by default.

Referenced by operator()().


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