|
Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
easylocal::Tester Class Template Reference#include <EasyLocal.h>
Inheritance diagram for easylocal::Tester
[legend]Collaboration diagram for easylocal::Tester:
[legend]List of all members.Public Methods
- Tester (StateManager< Input, State > *sm, OutputManager< Input, Output, State > *om, Input *in=NULL)
- virtual ~Tester ()
- void RunMainMenu ()
- void SetInput (Input *in)
- void SetMoveTester (AbstractMoveTester< Input, Output, State > *p_amt, int i)
- void AddMoveTester (AbstractMoveTester< Input, Output, State > *p_amt)
- void CleanMoveTesters ()
- void SetStateTester (StateTester< Input, Output, State > *p_st)
- void CleanRunners ()
- void SetRunner (Runner< Input, State > *p_ru, unsigned int i)
- void AddRunner (Runner< Input, State > *p_ru)
- void SetSolver (TokenRingSolver< Input, Output, State > *p_so)
- void SetSolverParameters (unsigned int rounds, unsigned int start_runner=0)
- void LoadInstance (std::string id)
- int AddRunnerToSolver (std::string name, std::string type)
- void SetRunningParameters (std::string name, std::string type, const ParameterBox &pb)
- void StartSolver ()
- void ProcessBatch (std::string filename)
- void CleanSolver ()
- void Check ()
- void Print (std::ostream &os=std::cout) const
Protected Methods
Protected Attributes
- std::vector<AbstractMoveTester<
Input,Output,State>* > move_testers
- std::vector<Runner<Input,State>* > runners
- TokenRingSolver<Input,Output,
State>* solver
- StateTester<Input,Output,State>* state_tester
- StateManager<Input,State>* p_sm
- OutputManager<Input,Output,
State>* p_om
- State test_state
- Input* p_in
- Output out
- int choice
- int sub_choice
Detailed Description
template<class Input, class Output, class State> class easylocal::Tester
A Tester collects a set of basic testers (move, state, ...) and allows to access them through sub-menus. It represent the external user interface provided by the framework.
Definition at line 1083 of file EasyLocal.h.
Constructor & Destructor Documentation
template<class Input, class Output, class State> |
easylocal::Tester< Input, Output, State >::Tester<Input, Output, State> (
|
StateManager< Input, State > * sm,
|
|
OutputManager< Input, Output, State > * om,
|
|
Input * in = NULL )
|
|
|
Constructs a tester by providing it links to a state manager, an output manager, and an input object. -
Parameters:
-
sm
|
a pointer to a compatible state manager |
om
|
a pointer to a compatible output manager |
in
|
a pointer to an input object |
Definition at line 2376 of file EasyLocalTemplates.cpp. |
template<class Input, class Output, class State> |
easylocal::Tester<Input, Output, State>::~Tester<Input, Output, State> (
|
) [inline, virtual]
|
|
Member Function Documentation
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::AddMoveTester<Input, Output, State> (
|
AbstractMoveTester< Input, Output, State > * p_amt )
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::AddRunner (
|
Runner< Input, State > * p_ru )
|
|
|
Adds a runner to the tester. -
Parameters:
-
p_ru
|
a pointer to a compatible runner |
Definition at line 2514 of file EasyLocalTemplates.cpp. |
template<class Input, class Output, class State> |
int easylocal::Tester< Input, Output, State >::AddRunnerToSolver (
|
std::string name,
|
|
std::string type ) [virtual]
|
|
|
Attaches the runner whose name and type are passed as parameter to the solver. -
Parameters:
-
name
|
the name of the runner to be attached |
type
|
the type of the runner to be attached |
Reimplemented from easylocal::AbstractTester.
Definition at line 2540 of file EasyLocalTemplates.cpp. |
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::Check (
|
)
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::CleanMoveTesters (
|
)
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::CleanRunners (
|
)
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::CleanSolver (
|
)
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::ExecuteDebuggingMenu (
|
) [protected]
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::ExecuteMainChoice (
|
) [protected]
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::ExecuteMovesChoice (
|
) [protected]
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::ExecuteRunChoice (
|
) [protected]
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::LoadInstance (
|
std::string id ) [virtual]
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::Print (
|
std::ostream & os = std::cout ) const
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::ProcessBatch (
|
std::string filename )
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::RunMainMenu (
|
)
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::SetInput (
|
Input * in )
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::SetMoveTester<Input, Output, State> (
|
AbstractMoveTester< Input, Output, State > * p_amt,
|
|
int i )
|
|
|
Sets the i-th move tester as the passed parameter. -
Parameters:
-
p_amt
|
a pointer to a move tester |
i
|
the position |
Definition at line 2339 of file EasyLocalTemplates.cpp. |
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::SetRunner (
|
Runner< Input, State > * p_ru,
|
|
unsigned int i )
|
|
|
Sets the i-th runner attached to the tester to the one passed as parameter. -
Parameters:
-
p_ru
|
a pointer to a compatible runner |
i
|
the position of the runner |
Definition at line 2501 of file EasyLocalTemplates.cpp. |
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::SetRunningParameters (
|
std::string name,
|
|
std::string type,
|
|
const ParameterBox & pb ) [virtual]
|
|
|
Sets the parameters of the runner specified by name and type. -
Parameters:
-
name
|
the name of the runner |
type
|
the type of the runner |
pb
|
the parameterbox that contains the parameters to be passed |
Reimplemented from easylocal::AbstractTester.
Definition at line 2575 of file EasyLocalTemplates.cpp. |
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::SetSolver (
|
TokenRingSolver< Input, Output, State > * p_so )
|
|
|
Sets the token-ring solver associated to the tester. -
Parameters:
-
p_so
|
a pointer to a compatible token-ring solver |
Definition at line 2461 of file EasyLocalTemplates.cpp. |
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::SetSolverParameters (
|
unsigned int rounds,
|
|
unsigned int start_runner = 0 )
|
|
|
Sets the parameters of the token-ring solver associated to the tester. -
Parameters:
-
rounds
|
the maximum number of non improving rounds |
start_runner
|
the runner used to start a round |
Definition at line 2477 of file EasyLocalTemplates.cpp. |
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::SetStateTester<Input, Output, State> (
|
StateTester< Input, Output, State > * p_st )
|
|
|
Sets the state tester as the passed parameter. -
Parameters:
-
p_st
|
a pointer to a state tester |
Definition at line 2364 of file EasyLocalTemplates.cpp. |
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::ShowDebuggingMenu (
|
) [protected]
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::ShowMainMenu (
|
) [protected]
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::ShowMovesMenu (
|
) [protected]
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::ShowRunMenu (
|
) [protected]
|
|
template<class Input, class Output, class State> |
void easylocal::Tester< Input, Output, State >::StartSolver (
|
) [virtual]
|
|
Member Data Documentation
template<class Input, class Output, class State> |
int easylocal::Tester<Input, Output, State>::choice [protected]
|
|
|
The option currently chosen from the menu.
Definition at line 1130 of file EasyLocal.h. |
template<class Input, class Output, class State> |
std::vector< AbstractMoveTester< Input, Output, State > * > easylocal::Tester<Input, Output, State>::move_testers [protected]
|
|
|
The set of attached move testers.
Definition at line 1118 of file EasyLocal.h. |
template<class Input, class Output, class State> |
Output easylocal::Tester<Input, Output, State>::out [protected]
|
|
template<class Input, class Output, class State> |
Input * easylocal::Tester<Input, Output, State>::p_in [protected]
|
|
|
A pointer to the input object.
Definition at line 1128 of file EasyLocal.h. |
template<class Input, class Output, class State> |
OutputManager< Input, Output, State > * easylocal::Tester<Input, Output, State>::p_om [protected]
|
|
|
A pointer to an output producer.
Definition at line 1126 of file EasyLocal.h. |
template<class Input, class Output, class State> |
StateManager< Input, State > * easylocal::Tester<Input, Output, State>::p_sm [protected]
|
|
template<class Input, class Output, class State> |
std::vector< Runner< Input, State > * > easylocal::Tester<Input, Output, State>::runners [protected]
|
|
template<class Input, class Output, class State> |
TokenRingSolver< Input, Output, State > * easylocal::Tester<Input, Output, State>::solver [protected]
|
|
|
A token ring solver to be used for batch file processing.
Definition at line 1121 of file EasyLocal.h. |
template<class Input, class Output, class State> |
StateTester< Input, Output, State > * easylocal::Tester<Input, Output, State>::state_tester [protected]
|
|
template<class Input, class Output, class State> |
int easylocal::Tester<Input, Output, State>::sub_choice [protected]
|
|
|
The option currently chosen from the menu.
Definition at line 1130 of file EasyLocal.h. |
template<class Input, class Output, class State> |
State easylocal::Tester<Input, Output, State>::test_state [protected]
|
|
|
The current state managed by the tester.
Definition at line 1127 of file EasyLocal.h. |
The documentation for this class was generated from the following files:
|