pdf::PluginRenderResultImpl Class Reference

#include <render_result_impl.h>

Inheritance diagram for pdf::PluginRenderResultImpl:
Inheritance graph
[legend]
Collaboration diagram for pdf::PluginRenderResultImpl:
Collaboration graph
[legend]

Public Member Functions

 PluginRenderResultImpl (const unsigned int page_num, const unsigned int id)
 ~PluginRenderResultImpl (void)
void set_page (PagePtr ptr)
PagePtr get_page ()
void set_discard (bool s)
bool is_discard ()
void set_page_number (const unsigned int n)
unsigned int get_page_number ()
void set_ref_id (const unsigned int r)
unsigned int get_ref_id ()

Data Fields

utils::Signal
< PluginRenderResultImpl * > 
release_signal

Friends

class PDFPage

Detailed Description

Definition at line 42 of file pdf/plugin_impl/render_result_impl.h.


Constructor & Destructor Documentation

pdf::PluginRenderResultImpl::PluginRenderResultImpl ( const unsigned int  page_num,
const unsigned int  id 
)

Definition at line 40 of file pdf/plugin_impl/render_result_impl.cpp.

References utils::ObjectTable< T >::add_interface(), IPluginRenderResult::get_anchor_from_coordinates, IPluginRenderResult::get_bitmap_attributes, IPluginRenderResult::get_bounding_rectangles_from_range, IPluginRenderResult::get_rendered_range, IPluginRotation::get_rotation, IPluginZoom::get_zoom_factor, _IPluginUnknown::query_interface, _IPluginUnknown::release, IPluginRotation::set_rotation, and IPluginZoom::set_zoom_factor.

00041 : page(0)
00042 , page_number(page_num)
00043 , ref_id(id)
00044 , discard(false)
00045 {
00046     // IPluginUnknown
00047     query_interface = query_interface_impl;
00048     release = release_impl;
00049 
00050     // IPluginRenderResult
00051     get_bitmap_attributes = get_bitmap_attributes_impl;
00052     get_anchor_from_coordinates = get_anchor_from_coordinates_impl;
00053     get_bounding_rectangles_from_range = get_bounding_rectangles_from_range_impl;
00054     get_rendered_range = get_rendered_range_impl;
00055 
00056     // IPluginRenderSettings, no method yet.
00057 
00058     // IPluginZoom
00059     set_zoom_factor = set_zoom_factor_impl;
00060     get_zoom_factor = get_zoom_factor_impl;
00061 
00062     // IPluginRotation
00063     set_rotation = set_rotation_impl;
00064     get_rotation = get_rotation_impl;
00065 
00066     // Initialize all supported interfaces. In render result, 
00067     // the render settings, zoom and rotation are read only.
00068     g_instances_table.add_interface<IPluginUnknown>(this);
00069     g_instances_table.add_interface<IPluginRenderResult>(this);
00070     g_instances_table.add_interface<IPluginRenderSettings>(this);
00071     g_instances_table.add_interface<IPluginZoom>(this);
00072     g_instances_table.add_interface<IPluginRotation>(this);
00073 
00074 }

Here is the call graph for this function:

pdf::PluginRenderResultImpl::~PluginRenderResultImpl ( void   ) 

Definition at line 87 of file pdf/plugin_impl/render_result_impl.cpp.

References utils::ObjectTable< T >::remove(), and pdf::PDFPage::unlock().

00088 {
00089     // unlock the pdf page but not delete it
00090     // the page would be deleted by cache manager
00091     if (page != 0)
00092     {
00093         page->unlock();
00094     }
00095 
00096     g_instances_table.remove(this);
00097 }

Here is the call graph for this function:


Member Function Documentation

PagePtr pdf::PluginRenderResultImpl::get_page (  )  [inline]

Definition at line 57 of file pdf/plugin_impl/render_result_impl.h.

00057 {return page;}

unsigned int pdf::PluginRenderResultImpl::get_page_number (  )  [inline]

Definition at line 63 of file pdf/plugin_impl/render_result_impl.h.

00063 {return page_number;}

unsigned int pdf::PluginRenderResultImpl::get_ref_id (  )  [inline]

Definition at line 65 of file pdf/plugin_impl/render_result_impl.h.

00065 {return ref_id;}

bool pdf::PluginRenderResultImpl::is_discard (  )  [inline]

Definition at line 60 of file pdf/plugin_impl/render_result_impl.h.

00060 {return discard;}

void pdf::PluginRenderResultImpl::set_discard ( bool  s  )  [inline]

Definition at line 59 of file pdf/plugin_impl/render_result_impl.h.

Referenced by pdf::PDFRenderTask::execute().

00059 {discard = s;}

Here is the caller graph for this function:

void pdf::PluginRenderResultImpl::set_page ( PagePtr  ptr  ) 

Definition at line 76 of file pdf/plugin_impl/render_result_impl.cpp.

References pdf::PDFPage::get_page_num(), pdf::PDFPage::get_ref_id(), and pdf::PDFPage::lock().

Referenced by pdf::PDFRenderTask::execute(), and pdf::PDFRenderer::post_render_task().

00077 {
00078     if (ptr != 0)
00079     {
00080         page = ptr;
00081         page_number = static_cast<unsigned int>(page->get_page_num());
00082         ref_id = page->get_ref_id();
00083         page->lock();
00084     }
00085 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf::PluginRenderResultImpl::set_page_number ( const unsigned int  n  )  [inline]

Definition at line 62 of file pdf/plugin_impl/render_result_impl.h.

00062 {page_number = n;}

void pdf::PluginRenderResultImpl::set_ref_id ( const unsigned int  r  )  [inline]

Definition at line 64 of file pdf/plugin_impl/render_result_impl.h.

00064 {ref_id = r;}


Friends And Related Function Documentation

friend class PDFPage [friend]

Definition at line 127 of file pdf/plugin_impl/render_result_impl.h.


Field Documentation

Definition at line 53 of file pdf/plugin_impl/render_result_impl.h.


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