io_control


The os_io_control class contains attributes commonly used in the creation and use of I/O objects. You can specify special I/O characteristics for any object with a constructor that takes an os_ioctl_t . A parameter of this type accepts either an os_io_control object or a bitwise-OR of the following flags.

Library

IO<ToolKit>

Declaration

#include <ospace/io/iocontrl.h>

class os_io_control

Enums

enum os_io_control::type_t
  {
  read_only_access,
  write_only_access,
  read_write_access,
  write_append_access,
  read_write_append_access
  };
  

Interface

Constructor
os_io_control( os_ioctl_t control )
Constructs an I/O object with encoded bits control (default 0 ).
Constructor
os_io_control( const os_io_control& control )
Constructs an I/O object that is a copy of control .
<
bool operator<( os_ioctl_t control )
Returns true if this value is less than control .
=
os_io_control& operator=( os_ioctl_t control )
Assigns an I/O object from control .
=
os_io_control& operator=( const os_io_control& control )
Assigns an I/O object from control .
==
bool operator==( const os_io_control& control ) const
Returns true if this object's value is the same as control 's.
(os_ioctl_t)
operator os_ioctl_t() const
Returns the object's encoded control bits.
append
bool append() const
Returns true if append on write.
append
void append( bool flag )
Sets write on append to flag .
get_flags
bool get_flags( os_ioctl_t mask ) const
Returns true if the flags specified by mask are set.
print
void print( ostream& stream ) const
Prints the object to stream .
read_only
bool read_only() const
Returns true if read only.
read_write
bool read_write() const
Returns true if read and write.
readable
bool readable() const
Returns true if readable.
set_flags
void set_flags( os_ioctl_t mask , bool state )
Sets the flags specified by mask to state (default true ).
set_read_only
void set_read_only()
Changes flow setting to read only.
set_read_write
void set_read_write()
Changes flow setting to read and write.
set_write_only
void set_write_only()
Changes flow setting to write only.
value
os_ioctl_t value() const
Returns the object's encoded control bits.
value
void value( os_ioctl_t control )
Sets the object's encoded control bits to control .
write_only
bool write_only() const
Returns true if write only.
writable
bool writable() const
Returns true if writable.

UNIX-Specific Interface

async
void async( bool flag )
Sets asynchronous reading to flag .
async
bool async() const
Returns true if asynchronous signaling on data ready.
close_on_exec
void close_on_exec( bool flag )
Sets close on exec to flag .
close_on_exec
bool close_on_exec() const
Returns true if close on process exec.
no_error
bool no_error() const
Returns true if error inhibition on truncate.
no_error
void no_error( bool flag )
Sets error inhibition on truncation to flag .
non_blocking
void non_blocking( bool flag )
Sets non-blocking to flag .
non_blocking
bool non_blocking() const
Returns true if non-blocking.
sync
bool sync() const
Returns true if synchronous writes.
sync
void sync( bool flag )
Sets synchronous writing to flag .
undo
bool undo() const
Returns true if undo.
undo
void undo( bool flag )
Sets undo to flag .

Non-Member Functions

<<
ostream& operator<<( ostream& stream , const os_io_control& control )
Prints control to stream .

Universal Streaming Service

#include <ospace/uss/io.h>

<<
os_bstream& operator<<( os_bstream& stream , const os_io_control& control )
Writes control to stream .
>>
os_bstream& operator>>( os_bstream& stream , os_io_control& control )
Reads control from stream .

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.