fix8  version 1.4.0
Open Source C++ FIX Framework
coroutine_ref Class Reference

#include <coroutine.hpp>

Public Member Functions

 coroutine_ref (coroutine &c)
 
 coroutine_ref (coroutine *c)
 
 ~coroutine_ref ()
 
 operator int () const
 
int & operator= (int v)
 

Private Member Functions

void operator= (const coroutine_ref &)=delete
 

Private Attributes

int & value_
 
bool modified_
 

Detailed Description

Definition at line 26 of file coroutine.hpp.

Constructor & Destructor Documentation

coroutine_ref::coroutine_ref ( coroutine c)
inline

Definition at line 33 of file coroutine.hpp.

33 : value_(c.value_), modified_(false) {}
int value_
Definition: coroutine.hpp:17
coroutine_ref::coroutine_ref ( coroutine c)
inline

Definition at line 34 of file coroutine.hpp.

34 : value_(c->value_), modified_(false) {}
int value_
Definition: coroutine.hpp:17
coroutine_ref::~coroutine_ref ( )
inline

Definition at line 35 of file coroutine.hpp.

35 { if (!modified_) value_ = -1; }

Member Function Documentation

coroutine_ref::operator int ( ) const
inline

Definition at line 36 of file coroutine.hpp.

References value_.

36 { return value_; }
void coroutine_ref::operator= ( const coroutine_ref )
privatedelete
int& coroutine_ref::operator= ( int  v)
inline

Definition at line 37 of file coroutine.hpp.

37 { modified_ = true; return value_ = v; }

Member Data Documentation

bool coroutine_ref::modified_
private

Definition at line 30 of file coroutine.hpp.

int& coroutine_ref::value_
private

Definition at line 29 of file coroutine.hpp.

Referenced by operator int().


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