SObjectizer  5.5
Public Types | Public Member Functions | List of all members
so_5::stop_guard_t Class Referenceabstract

An interface of stop_guard entity. More...

#include <stop_guard.hpp>

Inheritance diagram for so_5::stop_guard_t:
so_5::experimental::testing::v1::impl::stop_guard_for_unfreezer_t

Public Types

enum  setup_result_t { setup_result_t::ok, setup_result_t::stop_already_in_progress }
 Type for result of setting up a new stop_guard. More...
 
enum  what_if_stop_in_progress_t { what_if_stop_in_progress_t::throw_exception, what_if_stop_in_progress_t::return_negative_result }
 

Public Member Functions

 stop_guard_t ()=default
 
 stop_guard_t (const stop_guard_t &)=delete
 
 stop_guard_t (stop_guard_t &&)=delete
 
virtual ~stop_guard_t () noexcept=default
 
stop_guard_toperator= (const stop_guard_t &)=delete
 
stop_guard_toperator= (stop_guard_t &&)=delete
 
virtual void stop () noexcept=0
 Perform stop-related actions. More...
 

Detailed Description

An interface of stop_guard entity.

All implementations of stop_guards must implement this interface.

Since
v.5.5.19.2
Examples:
so_5/stop_guard/main.cpp.

Member Enumeration Documentation

◆ setup_result_t

Type for result of setting up a new stop_guard.

Enumerator
ok 

New stop_guard has be set successfully.

stop_already_in_progress 

New stop_guard has not been set because stop operation is already in progress.

◆ what_if_stop_in_progress_t

What to do if attempt to setup a new stop_guard is performed when the stop operation is in progress.

Enumerator
throw_exception 

An exception must be thrown.

return_negative_result 

Return negative setup result.

Constructor & Destructor Documentation

◆ stop_guard_t() [1/3]

so_5::stop_guard_t::stop_guard_t ( )
default

◆ stop_guard_t() [2/3]

so_5::stop_guard_t::stop_guard_t ( const stop_guard_t )
delete

◆ stop_guard_t() [3/3]

so_5::stop_guard_t::stop_guard_t ( stop_guard_t &&  )
delete

◆ ~stop_guard_t()

virtual so_5::stop_guard_t::~stop_guard_t ( )
virtualdefaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

stop_guard_t& so_5::stop_guard_t::operator= ( const stop_guard_t )
delete

◆ operator=() [2/2]

stop_guard_t& so_5::stop_guard_t::operator= ( stop_guard_t &&  )
delete

◆ stop()

virtual void so_5::stop_guard_t::stop ( )
pure virtualnoexcept

Perform stop-related actions.

This method will be called by SObjectizer Environment when an user called environment_t::stop().

Stop_guard must start stop-related activities. When all these activities will be finished the stop_guard must remove itself from the list of stop_guards.

Implemented in so_5::experimental::testing::v1::impl::stop_guard_for_unfreezer_t.

Examples:
so_5/stop_guard/main.cpp.

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