Akumuli
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Akumuli::CoroCursor Struct Reference
Inheritance diagram for Akumuli::CoroCursor:
Akumuli::Cursor Akumuli::InternalCursor Akumuli::ExternalCursor

Public Member Functions

virtual size_t read_ex (void *buffer, size_t buffer_size)
 Read portion of the data to the buffer. More...
 
virtual bool is_done () const
 Check is everything done.
 
virtual bool is_error (aku_Status *out_error_code_or_null=nullptr) const
 Check is error occured and (optionally) get the error code.
 
virtual void close ()
 Finalizer.
 
void set_error (Caller &caller, aku_Status error_code)
 Set error and stop execution.
 
bool put (Caller &caller, aku_Sample const &result)
 Send offset to caller.
 
void complete (Caller &caller)
 
template<class Fn_1arg_caller >
void start (Fn_1arg_caller const &fn)
 

Static Public Member Functions

template<class Fn_1arg >
static std::unique_ptr
< ExternalCursor
make (Fn_1arg const &fn)
 
template<class Fn_2arg , class Tobj , class T2nd >
static std::unique_ptr
< ExternalCursor
make (Fn_2arg const &fn, Tobj obj, T2nd const &arg2)
 
template<class Fn_3arg , class Tobj , class T2nd , class T3rd >
static std::unique_ptr
< ExternalCursor
make (Fn_3arg const &fn, Tobj obj, T2nd const &arg2, T3rd const &arg3)
 
template<class Fn_4arg , class Tobj , class T2nd , class T3rd , class T4th >
static std::unique_ptr
< ExternalCursor
make (Fn_4arg const &fn, Tobj obj, T2nd const &arg2, T3rd const &arg3, T4th const &arg4)
 

Public Attributes

boost::shared_ptr< Coroutine > coroutine_
 
CursorFSM cursor_fsm_
 

Member Function Documentation

size_t Akumuli::CoroCursor::read_ex ( void *  buffer,
size_t  buffer_size 
)
virtual

Read portion of the data to the buffer.

New read interface for variably sized samples.

Parameters
bufferis an array of aku_Sample structs
item_sizedefines size of each struct 0 - size = sizeof(aku_Sample)
buffer_sizedefines size of the buffer in bytes (should be a multiple of item_size)
Returns
number of overwritten bytes in buffer

Implements Akumuli::ExternalCursor.


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