Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
CPPHTTPLIB_NAMESPACE::detail::scope_exit Struct Reference

Public Member Functions

 scope_exit (std::function< void(void)> &&f)
 scope_exit (scope_exit &&rhs) noexcept
void release ()

Private Member Functions

 scope_exit (const scope_exit &)=delete
void operator= (const scope_exit &)=delete
scope_exit & operator= (scope_exit &&)=delete

Private Attributes

std::function< void(void)> exit_function
bool execute_on_destruction

Constructor & Destructor Documentation

◆ scope_exit() [1/2]

CPPHTTPLIB_NAMESPACE::detail::scope_exit::scope_exit ( std::function< void(void)> && f)
inlineexplicit
281977 : exit_function(std::move(f)), execute_on_destruction{true} {}

◆ scope_exit() [2/2]

CPPHTTPLIB_NAMESPACE::detail::scope_exit::scope_exit ( scope_exit && rhs)
inlinenoexcept
281980 : exit_function(std::move(rhs.exit_function)),
281981 execute_on_destruction{rhs.execute_on_destruction} {
281982 rhs.release();
281983 }

◆ ~scope_exit()

CPPHTTPLIB_NAMESPACE::detail::scope_exit::~scope_exit ( )
inline
281985 {
281986 if (execute_on_destruction) { this->exit_function(); }
281987 }

Member Function Documentation

◆ release()

void CPPHTTPLIB_NAMESPACE::detail::scope_exit::release ( )
inline
281989{ this->execute_on_destruction = false; }

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