OTest2
A C++ testing framework
Public Member Functions | List of all members
OTest2::CmdRunState Class Reference

Run a state. More...

#include <cmdrunstate.h>

Inheritance diagram for OTest2::CmdRunState:
Inheritance graph
[legend]
Collaboration diagram for OTest2::CmdRunState:
Collaboration graph
[legend]

Public Member Functions

 CmdRunState (const CmdRunState &)=delete
 
CmdRunStateoperator= (const CmdRunState &)=delete
 
 CmdRunState (CaseOrdinaryPtr parent_, StateOrdinaryPtr state_, bool wait_before_, int delay_)
 Ctor. More...
 
virtual ~CmdRunState ()
 Dtor. More...
 
virtual bool shouldWait (const Context &context_, int &delay_)
 Say whether the framework should wait before running the command. More...
 
virtual void run (const Context &context_)
 Run the command. More...
 
- Public Member Functions inherited from OTest2::Command
 Command (const Command &)=delete
 
Commandoperator= (const Command &)=delete
 
 Command ()
 Ctor. More...
 
virtual ~Command ()
 Dtor. More...
 

Detailed Description

Run a state.

Definition at line 32 of file cmdrunstate.h.

Constructor & Destructor Documentation

◆ CmdRunState() [1/2]

OTest2::CmdRunState::CmdRunState ( const CmdRunState )
delete

◆ CmdRunState() [2/2]

OTest2::CmdRunState::CmdRunState ( CaseOrdinaryPtr  parent_,
StateOrdinaryPtr  state_,
bool  wait_before_,
int  delay_ 
)
explicit

Ctor.

Parameters
parent_Parent of the state being run
state_The state being run
wait_before_If it's true the delay is applied.
delay_Delay before run of the state in milliseconds.

Definition at line 34 of file cmdrunstate.cpp.

◆ ~CmdRunState()

OTest2::CmdRunState::~CmdRunState ( )
virtual

Dtor.

Definition at line 47 of file cmdrunstate.cpp.

Member Function Documentation

◆ operator=()

CmdRunState& OTest2::CmdRunState::operator= ( const CmdRunState )
delete

◆ run()

void OTest2::CmdRunState::run ( const Context context_)
virtual

Run the command.

Parameters
context_The OTest2 context

Implements OTest2::Command.

Definition at line 62 of file cmdrunstate.cpp.

◆ shouldWait()

bool OTest2::CmdRunState::shouldWait ( const Context context_,
int &  delay_ 
)
virtual

Say whether the framework should wait before running the command.

Parameters
[in]context_the OTest2 context
[out]delay_The waiting delay in milliseconds. It's valid only if the true value is returned.
Returns
True forces the waiting.
Note
The default behavior is not wait.

Reimplemented from OTest2::Command.

Definition at line 51 of file cmdrunstate.cpp.


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