libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
crn::DefaultAction Class Reference

A class containing functors. More...

#include <CRNDefaultAction.h>

Static Public Member Functions

static SAction GetAction (const String &name)
 Gets a default action. More...
 
static void SetAction (const String &name, SAction action)
 Sets a default action. More...
 
static void Load (const Path &filename)
 Loads a set of default actions. More...
 
static void Save (const Path &filename)
 Saves the set of default actions. More...
 
static std::vector< StringGetActionList ()
 Gets the list of default actions. More...
 

Detailed Description

A class containing functors.

A class containing functors stored with a name. The whole set can be saved to a file or loaded from a file.

Definition at line 67 of file CRNDefaultAction.h.

Member Function Documentation

SAction DefaultAction::GetAction ( const String name)
static

Gets a default action.

Gets a default action

Parameters
[in]namethe key name of the action
Returns
the action functor or nullptr if none was found

Definition at line 74 of file CRNDefaultAction.cpp.

std::vector< String > DefaultAction::GetActionList ( )
static

Gets the list of default actions.

Gets the list of default actions

Returns
a vector containing the name of the available default actions

Definition at line 126 of file CRNDefaultAction.cpp.

void DefaultAction::Load ( const Path filename)
static

Loads a set of default actions.

Loads a set of default actions

Exceptions
ExceptionIOcannot read file
ExceptionUninitializedempty file
ExceptionNotFoundinvalid file
ExceptionProtocolload unimplemented
Parameters
[in]filenamethe path to the file containing the actions

Definition at line 104 of file CRNDefaultAction.cpp.

void DefaultAction::Save ( const Path filename)
static

Saves the set of default actions.

Saves a set of default actions

Exceptions
ExceptionIOcannot write file
ExceptionProtocolsave unimplemented
Parameters
[in]filenamethe path to the file to create or overwrite

Definition at line 117 of file CRNDefaultAction.cpp.

void DefaultAction::SetAction ( const String name,
SAction  action 
)
static

Sets a default action.

Sets a default action

Parameters
[in]namethe key name of the action
[in]actionthe functor

Definition at line 89 of file CRNDefaultAction.cpp.


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