SAGA C++ API 1.6
saga::const_buffer Class Reference

Encapsulates I/O operations. More...

#include <buffer.hpp>

Inheritance diagram for saga::const_buffer:

List of all members.

Public Member Functions

 const_buffer (void const *data, saga::ssize_t size)
 Creates an I/O buffer.
 ~const_buffer ()
 Destroys a buffer.
saga::ssize_t get_size () const
 Retrieves the current value for size.
void const * get_data () const
 Retrieves the buffer data.
void close (double timeout=0.0)
 Closes the object.

Detailed Description

Encapsulates I/O operations.

The SAGA API includes a number of calls which perform byte-level I/O operations, e.g. read()/write() on files and streams, and call() on rpc instances. Future SAGA API extensions are expected to increase the number of I/O methods. The saga::buffer class encapsulates a sequence of bytes to be used for such I/O operations - that allows for uniform I/O syntax and semantics over the various SAGA API packages.

Definition at line 37 of file buffer.hpp.

Constructor & Destructor Documentation

saga::const_buffer::const_buffer ( void const *  data,
saga::ssize_t  size 

Creates an I/O buffer.

dataData to be used
sizeSize of data to be used.
The newly created buffer.

Definition at line 13 of file buffer.cpp.

saga::const_buffer::~const_buffer ( )

Destroys a buffer.

Definition at line 23 of file buffer.cpp.

Member Function Documentation

saga::ssize_t saga::const_buffer::get_size ( ) const

Retrieves the current value for size.

Value of size.

Definition at line 42 of file buffer.cpp.

void const * saga::const_buffer::get_data ( ) const

Retrieves the buffer data.

Buffer data to retrieve.

Definition at line 47 of file buffer.cpp.

void saga::const_buffer::close ( double  timeout = 0.0)

Closes the object.

timeoutSeconds to wait

Definition at line 52 of file buffer.cpp.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines