EventHandler Class Reference

Collaboration diagram for EventHandler:
Collaboration graph
[legend]

Public Member Functions

 EventHandler (EventQueue *_eq)
 ~EventHandler ()
void handle_paginate_start (unsigned int page_count)
void handle_paginate_end (unsigned int page_count)
void handle_render_done (const PluginBitmapAttributes &ba, const Position &start_pos)
void handle_search_done (const std::vector< Range > &result_ranges, const SearchContext &search_context)

Detailed Description

Definition at line 117 of file multi_thread_test.cpp.


Constructor & Destructor Documentation

EventHandler::EventHandler ( EventQueue _eq  )  [inline]

Definition at line 120 of file multi_thread_test.cpp.

00121     : eq(_eq)
00122     {
00123     }

EventHandler::~EventHandler (  )  [inline]

Definition at line 124 of file multi_thread_test.cpp.

00125     {
00126     }


Member Function Documentation

void EventHandler::handle_paginate_end ( unsigned int  page_count  )  [inline]

Definition at line 134 of file multi_thread_test.cpp.

References EventQueue::append_event(), and e.

Referenced by main().

00135     {
00136         Event e(PAGINATE_ENDED, (void *)page_count);
00137         eq->append_event(e);
00138     }

Here is the call graph for this function:

Here is the caller graph for this function:

void EventHandler::handle_paginate_start ( unsigned int  page_count  )  [inline]

Definition at line 128 of file multi_thread_test.cpp.

References EventQueue::append_event(), and e.

Referenced by main().

00129     {
00130         Event e(PAGINATE_STARTED, (void *)1);
00131         eq->append_event(e);
00132     }

Here is the call graph for this function:

Here is the caller graph for this function:

void EventHandler::handle_render_done ( const PluginBitmapAttributes ba,
const Position start_pos 
) [inline]

Definition at line 140 of file multi_thread_test.cpp.

References EventQueue::append_event(), e, and RENDER_DONE.

Referenced by main().

00141     {
00142         RenderData *rd = new RenderData(ba, start_pos);
00143         Event e(RENDER_DONE, (void *)rd);
00144         eq->append_event(e);
00145     }

Here is the call graph for this function:

Here is the caller graph for this function:

void EventHandler::handle_search_done ( const std::vector< Range > &  result_ranges,
const SearchContext search_context 
) [inline]

Definition at line 147 of file multi_thread_test.cpp.

References EventQueue::append_event(), e, SearchResult::matches, and SearchResult::ranges.

Referenced by main().

00148     {
00149         SearchResult *p = new SearchResult;
00150         p->matches = result_ranges.size();
00151         p->ranges  = new Range[p->matches];
00152 
00153         for (unsigned int i=0; i<result_ranges.size(); i++)
00154         {
00155             p->ranges[i] = result_ranges[i];
00156         }
00157 
00158         Event e(SEARCH_DONE, (void *)p);
00159         eq->append_event(e);
00160     }

Here is the call graph for this function:

Here is the caller graph for this function:


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