ASCO Aerial Autonomy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
test_utils::WaitUntilResult< done > Struct Template Reference

Functor class that waits until the input function results in the template parameter or timeout which ever occurs first. More...

#include <test_utils.h>

Public Member Functions

bool operator() (std::function< bool(void)> const &input_function, std::chrono::seconds timeout)
 Waits until timeout or the input function returns done. More...
 

Detailed Description

template<bool done>
struct test_utils::WaitUntilResult< done >

Functor class that waits until the input function results in the template parameter or timeout which ever occurs first.

Template Parameters
doneSpecifies the result that the input function should provide when the wait is over

Member Function Documentation

template<bool done>
bool test_utils::WaitUntilResult< done >::operator() ( std::function< bool(void)> const &  input_function,
std::chrono::seconds  timeout 
)
inline

Waits until timeout or the input function returns done.

Parameters
input_functionLogic function
timeoutTimeout in seconds until to stop waiting for function output
Returns
the output of input function at the end of the function evaluation

The documentation for this struct was generated from the following file: