Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::http_plugin_impl::in_flight< T > Struct Template Reference
Collaboration diagram for sysio::http_plugin_impl::in_flight< T >:

Public Member Functions

 in_flight (T &&object, http_plugin_impl_ptr impl)
 
 ~in_flight ()
 
 in_flight (const in_flight &)=delete
 
 in_flight (in_flight &&from)
 
in_flightoperator= (const in_flight &)=delete
 
in_flightoperator= (in_flight &&from)
 
const Toperator* () const
 
Toperator* ()
 

Public Attributes

T _object
 
size_t _count
 
http_plugin_impl_ptr _impl
 

Detailed Description

template<typename T>
struct sysio::http_plugin_impl::in_flight< T >

Helper type that wraps an object of type T and records its "in flight" size to http_plugin_impl::bytes_in_flight using RAII semantics

Template Parameters
T- the contained Type

Definition at line 405 of file http_plugin.cpp.

Constructor & Destructor Documentation

◆ in_flight() [1/3]

template<typename T >
sysio::http_plugin_impl::in_flight< T >::in_flight ( T && object,
http_plugin_impl_ptr impl )
inline

Definition at line 406 of file http_plugin.cpp.

407 :_object(std::move(object))
408 ,_impl(std::move(impl))
409 {
410 _count = detail::in_flight_sizeof(_object);
411 _impl->bytes_in_flight += _count;
412 }

◆ ~in_flight()

template<typename T >
sysio::http_plugin_impl::in_flight< T >::~in_flight ( )
inline

Definition at line 414 of file http_plugin.cpp.

414 {
415 if (_count) {
416 _impl->bytes_in_flight -= _count;
417 }
418 }

◆ in_flight() [2/3]

template<typename T >
sysio::http_plugin_impl::in_flight< T >::in_flight ( const in_flight< T > & )
delete

◆ in_flight() [3/3]

template<typename T >
sysio::http_plugin_impl::in_flight< T >::in_flight ( in_flight< T > && from)
inline

Definition at line 422 of file http_plugin.cpp.

423 :_object(std::move(from._object))
424 ,_count(from._count)
425 ,_impl(std::move(from._impl))
426 {
427 from._count = 0;
428 }

Member Function Documentation

◆ operator*() [1/2]

template<typename T >
T & sysio::http_plugin_impl::in_flight< T >::operator* ( )
inline

mutable accessor (can be moved frmo)

Returns
mutable reference to the contained object

Definition at line 451 of file http_plugin.cpp.

451 {
452 return _object;
453 }

◆ operator*() [2/2]

template<typename T >
const T & sysio::http_plugin_impl::in_flight< T >::operator* ( ) const
inline

const accessor

Returns
const reference to the contained object

Definition at line 443 of file http_plugin.cpp.

443 {
444 return _object;
445 }

◆ operator=() [1/2]

template<typename T >
in_flight & sysio::http_plugin_impl::in_flight< T >::operator= ( const in_flight< T > & )
delete

◆ operator=() [2/2]

template<typename T >
in_flight & sysio::http_plugin_impl::in_flight< T >::operator= ( in_flight< T > && from)
inline

Definition at line 432 of file http_plugin.cpp.

432 {
433 _object = std::move(from._object);
434 _count = from._count;
435 _impl = std::move(from._impl);
436 from._count = 0;
437 }

Member Data Documentation

◆ _count

template<typename T >
size_t sysio::http_plugin_impl::in_flight< T >::_count

Definition at line 456 of file http_plugin.cpp.

◆ _impl

Definition at line 457 of file http_plugin.cpp.

◆ _object

template<typename T >
T sysio::http_plugin_impl::in_flight< T >::_object

Definition at line 455 of file http_plugin.cpp.


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