images::PluginDocImpl Class Reference

Implement all necessary interfaces for document object. If the interface is not supported, the impl can remove them from parent class list. More...

#include <document_impl.h>

Inheritance diagram for images::PluginDocImpl:
Inheritance graph
[legend]
Collaboration diagram for images::PluginDocImpl:
Collaboration graph
[legend]

Public Member Functions

 PluginDocImpl ()
 ~PluginDocImpl ()
unsigned int get_page_count ()
unsigned int get_page_number (const std::string &anchor)
bool get_page_name (const std::string &anchor, std::string &name)
int get_page (const std::string &anchor)
 Retrieve the image directly.
bool get_anchor_of_page (const unsigned int page_number, std::string &anchor)
 Retrieve the anchor for given page number.
bool get_prev_page (std::string &anchor)
 Anchor iteraotr: retrieve the previous anchor.
bool get_next_page (std::string &anchor)
 Anchor iteraotr: retrieve the next anchor.
ImagesDocumentget_doc (void)
bool get_original_size (const std::string &anchor, unsigned int &width, unsigned int &height)
bool get_original_rotation (const std::string &anchor, PluginRotationDegree &rotation)

Data Fields

Signal< PluginDocImpl * > release_signal
 The release signal.

Detailed Description

Implement all necessary interfaces for document object. If the interface is not supported, the impl can remove them from parent class list.

Definition at line 48 of file images/plugin_impl/document_impl.h.


Constructor & Destructor Documentation

images::PluginDocImpl::PluginDocImpl (  ) 

Definition at line 37 of file images/plugin_impl/document_impl.cpp.

References IPluginEventBroadcaster::add_event_receiver, utils::ObjectTable< T >::add_interface(), IPluginDocument::close, IPluginDocNavigator::compare_anchor_location, IPluginDocument::create_view, IPluginDocAttributes::get_attribute, IPluginDocNavigator::get_file_name_from_anchor, IPluginDocNavigator::get_file_position_from_anchor, IPluginDocNavigator::get_initial_anchor, IPluginDocNavigator::get_object_from_anchor, IPluginDocMarker::get_supported_marker_types, IPluginDocHyperlink::get_target_from_hyperlink, IPluginDocNavigator::get_text_from_range, IPluginDocNavigator::get_type_of_object, IPluginDocNavigator::get_words_from_range, IPluginDocNavigator::is_anchor_in_current_document, IPluginDocDictionary::is_dictionary, IPluginDocHyperlink::is_hyperlink, IPluginDocument::is_open, LOGPRINTF, IPluginDocument::open, _IPluginUnknown::query_interface, _IPluginUnknown::release, IPluginEventBroadcaster::remove_event_receiver, IPluginDocMarker::request_marker_trees, and IPluginDocAttributes::set_attribute.

00041 {
00042     LOGPRINTF("entry");
00043 
00044     // IPluginUnknown
00045     query_interface = query_interface_impl;
00046     release         = release_impl;
00047 
00048     // IPluginDocument
00049     open        = open_impl;
00050     is_open     = is_open_impl;
00051     close       = close_impl;
00052     create_view = create_view_impl;
00053 
00054     // IPluginDocNavigator
00055     get_initial_anchor      = get_initial_anchor_impl;
00056     get_object_from_anchor  = get_object_from_anchor_impl;
00057     get_type_of_object      = get_type_of_object_impl;
00058     get_words_from_range    = get_words_from_range_impl;
00059     get_text_from_range     = get_text_from_range_impl;
00060     is_anchor_in_current_document = is_anchor_in_current_document_impl;
00061     get_file_name_from_anchor = get_file_name_from_anchor_impl;
00062     get_file_position_from_anchor = get_file_position_from_anchor_impl;
00063     compare_anchor_location = compare_anchor_location_impl;
00064 
00065     // IPluginDocAttributes
00066     get_attribute = get_attribute_impl;
00067     set_attribute = set_attribute_impl;
00068 
00069     // IPluginEventBroadcaster
00070     add_event_receiver      = add_event_receiver_impl;
00071     remove_event_receiver   = remove_event_receiver_impl;
00072 
00073     // IPluginDocHyperlink
00074     is_hyperlink                = is_hyperlink_impl;
00075     get_target_from_hyperlink   = get_target_from_hyperlink_impl;
00076 
00077     // IPluginDocDictionary
00078     is_dictionary = is_dictionary_impl;
00079 
00080     // IPluginDocMarker
00081     get_supported_marker_types  = get_supported_marker_types_impl;
00082     request_marker_trees        = request_marker_trees_impl;
00083 
00084     // Initialize interface and object table.
00085     g_instances_table.add_interface<IPluginUnknown>(this);
00086     g_instances_table.add_interface<IPluginDocument>(this);
00087     g_instances_table.add_interface<IPluginDocNavigator>(this);
00088     g_instances_table.add_interface<IPluginDocAttributes>(this);
00089     g_instances_table.add_interface<IPluginEventBroadcaster>(this);
00090     g_instances_table.add_interface<IPluginDocHyperlink>(this);
00091     g_instances_table.add_interface<IPluginDocDictionary>(this);
00092 

Here is the call graph for this function:

images::PluginDocImpl::~PluginDocImpl (  ) 

Definition at line 101 of file images/plugin_impl/document_impl.cpp.

00105 {
00106     LOGPRINTF("entry");
00107 


Member Function Documentation

bool images::PluginDocImpl::get_anchor_of_page ( const unsigned int  page_number,
std::string &  anchor 
)

Retrieve the anchor for given page number.

Definition at line 138 of file images/plugin_impl/document_impl.cpp.

00143 {
00144     LOGPRINTF("%d", page_number);

ImagesDocument * images::PluginDocImpl::get_doc ( void   ) 

Definition at line 160 of file images/plugin_impl/document_impl.cpp.

Referenced by images::PluginViewImpl::PluginViewImpl().

00164 {
00165     LOGPRINTF("entry");

Here is the caller graph for this function:

bool images::PluginDocImpl::get_next_page ( std::string &  anchor  ) 

Anchor iteraotr: retrieve the next anchor.

Definition at line 153 of file images/plugin_impl/document_impl.cpp.

00157 {
00158     LOGPRINTF("%s", anchor.c_str());

bool images::PluginDocImpl::get_original_rotation ( const std::string &  anchor,
PluginRotationDegree rotation 
)

Definition at line 174 of file images/plugin_impl/document_impl.cpp.

00179 {

bool images::PluginDocImpl::get_original_size ( const std::string &  anchor,
unsigned int &  width,
unsigned int &  height 
)

Definition at line 167 of file images/plugin_impl/document_impl.cpp.

00173 {

int images::PluginDocImpl::get_page ( const std::string &  anchor  ) 

Retrieve the image directly.

Definition at line 129 of file images/plugin_impl/document_impl.cpp.

00133 {
00134     unsigned int page_number = get_page_number(anchor);
00135 
00136     LOGPRINTF("%s %d", anchor.c_str(), page_number);

unsigned int images::PluginDocImpl::get_page_count (  ) 

Retrieve total page number. This function is used by PluginViewImpl

Definition at line 109 of file images/plugin_impl/document_impl.cpp.

00113 {
00114     LOGPRINTF("%d", document.page_count());

bool images::PluginDocImpl::get_page_name ( const std::string &  anchor,
std::string &  name 
)

Definition at line 123 of file images/plugin_impl/document_impl.cpp.

00128 {

unsigned int images::PluginDocImpl::get_page_number ( const std::string &  anchor  ) 

Retrieve page number from anchor. This function is used by PluginViewImpl.

Definition at line 116 of file images/plugin_impl/document_impl.cpp.

00120 {
00121     LOGPRINTF("%s", anchor.c_str());

bool images::PluginDocImpl::get_prev_page ( std::string &  anchor  ) 

Anchor iteraotr: retrieve the previous anchor.

Definition at line 146 of file images/plugin_impl/document_impl.cpp.

00150 {
00151     LOGPRINTF("%s", anchor.c_str());


Field Documentation

The release signal.

Definition at line 97 of file images/plugin_impl/document_impl.h.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208