Seg3D  2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
Core::ActionDispatcher Class Reference
Inheritance diagram for Core::ActionDispatcher:

Public Types

typedef boost::signals2::signal< void(ActionHandle) > pre_action_signal_type
 The type of the main action signal.
 
typedef boost::signals2::signal< void(ActionHandle, ActionResultHandle) > post_action_signal_type
 
typedef boost::signals2::signal< void(ActionProgressHandle) > action_progress_signal_type
 

Public Member Functions

void post_action (ActionHandle action, ActionContextHandle action_context)
 
void post_and_wait_action (ActionHandle action, ActionContextHandle action_context)
 
void post_actions (std::vector< ActionHandle > actions, ActionContextHandle action_context)
 Post multiple actions in specified order.
 
void post_and_wait_actions (std::vector< ActionHandle > actions, ActionContextHandle action_context)
 Post multiple actions in specified order and wait for them to finish.
 
bool is_busy ()
 Returns true if there are actions being processed, otherwise false.
 
boost::posix_time::ptime last_action_completed () const
 Returns the timestamp of the last action that was completed.
 

Static Public Member Functions

static void PostAction (const ActionHandle &action, const ActionContextHandle &action_context)
 This function is a short cut to posting an action using the dispatcher.
 
static void PostAndWaitAction (const ActionHandle &action, const ActionContextHandle &action_context)
 
static bool IsBusy ()
 This is a short cut function to the "is_busy" function of the singleton.
 

Public Attributes

pre_action_signal_type pre_action_signal_
 
post_action_signal_type post_action_signal_
 
action_progress_signal_type begin_progress_signal_
 
action_progress_signal_type end_progress_signal_
 This signals the end of the slow action.
 
action_progress_signal_type report_progress_signal_
 Issued every time when progress can be reported.
 

Friends

class ActionDispatcherPrivate
 

Member Function Documentation

void Core::ActionDispatcher::post_action ( ActionHandle  action,
ActionContextHandle  action_context 
)

Post an action onto the application thread, the action is posted on the stack of actions that need to be processed. Each action needs to be posted with an ActionContextHandle which describes where feedback from the action needs to posted. The action context needs to be created before posting the action.

void Core::ActionDispatcher::post_and_wait_action ( ActionHandle  action,
ActionContextHandle  action_context 
)

Post an action onto the application thread, the action is posted on the stack of actions that need to be processed. Each action needs to be posted with an ActionContextHandle which describes where feedback from the action needs to posted. The action context needs to be created before posting the action. This function also waits on the action to be fully completed and hence needs to be called from a thread that is not needed for action processing

void Core::ActionDispatcher::PostAndWaitAction ( const ActionHandle &  action,
const ActionContextHandle &  action_context 
)
static

This function is a short cut to posting an action using the dispatcher and waiting until the action has been completed

Member Data Documentation

action_progress_signal_type Core::ActionDispatcher::begin_progress_signal_

This signals a slow action that is being processed and progress needs to be reported This is only in a few instances needed, like loading files, where the load happens inside the action. The interface can connect to this signal so it can block further input until the action has been processed

post_action_signal_type Core::ActionDispatcher::post_action_signal_

Connect an observer that records all the actions in the program after they are executed.

pre_action_signal_type Core::ActionDispatcher::pre_action_signal_

Connect an observer that records all the actions in the program before they are executed


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