Wheefun I/O Library  0.0.5
Useful I/O Primitives.
Public Member Functions | List of all members
wfio::os::beos::BeOSDevice Class Reference

A device wrapping a BeOS IO Object. More...

#include <beos.h>

Inheritance diagram for wfio::os::beos::BeOSDevice:
Inheritance graph
[legend]
Collaboration diagram for wfio::os::beos::BeOSDevice:
Collaboration graph
[legend]

Public Member Functions

 BeOSDevice (BDataIO *io, int *error=NULL)
 Construct a new BEOSDevice from a BDataIO. More...
 
 BeOSDevice (BPositionIO *io, int *error=NULL)
 Construct a new BEOSDevice from a BPositionIO. More...
 
 BeOSDevice (BBufferIO *io, int *error=NULL)
 Construct a new BEOSDevice from a BDataIO. More...
 
- Public Member Functions inherited from wfio::Device
 Device ()
 Construct the default Device. More...
 
 Device (CType dev, bool acquire=true)
 Wrap a wfio_device_t. More...
 
 Device (CType dev, IOShare ioshare)
 Wrap a wfio:device_t using an IOShare. More...
 
WFIO_CXX_DLL Device (CXXStrategy *strategy)
 Create a new Device from a CXXStrategy. More...
 
 Device (const Device &dev)
 Copy-construct a device. More...
 
 ~Device ()
 Release this Device. More...
 
size_t read (void *buf, size_t sz, size_t elem)
 Write elements to this Device. More...
 
size_t read (void *buf, size_t len)
 Write a vector of bytes to this Device. More...
 
int read ()
 Read a single byte from this Device. More...
 
size_t write (const void *buf, size_t sz, size_t elem)
 Write a vector of elements to this Device. More...
 
size_t write (const void *buf, size_t len)
 Write a vector of bytes to this Device. More...
 
bool write (char c)
 Write a single byte to this Device. More...
 
bool seek (wfio_off_t offset, wfio_whence_t whence)
 Seek to a position in this Device. More...
 
wfio_off_t tell () const
 Determine the current stream position of this Device. More...
 
Device dup ()
 Duplicate this Device. More...
 
bool flush ()
 Attempt to flush this Device. More...
 
size_t bufsz (size_t len)
 Set the buffer size for this Device. More...
 
size_t bufsz () const
 Obtain the buffer size for this Device. More...
 
bool buffered () const
 Determine whether or not the device is buffered. More...
 
int dcntl (::wfio_dcntl_t cmd,...)
 Perform device-independent I/O control on this Device. More...
 
int ioctl (int cmd,...)
 Perform device-dependent I/O control on this Device. More...
 
int flags () const throw ()
 Obtain the flags vector associated with this Device.
 
int ecode () const throw ()
 Obtain the error code associated with this Device.
 
void ecode (int ecode) throw ()
 Set the error code associated with this Device. More...
 
bool valid () const throw ()
 Determine if this Device is valid. More...
 
 operator bool () const throw ()
 Synonymous with this->valid(). More...
 
 operator::wfio_device_t * () throw ()
 Implicitly convert this Device into it's C equivalent.
 
WFIO_CXX_DLL Deviceoperator= (const Device &rhs)
 Perform assignment on this Device. More...
 

Additional Inherited Members

- Public Types inherited from wfio::Device
typedef ::wfio_device_tCType
 The C type from which a Device is derived.
 

Detailed Description

A device wrapping a BeOS IO Object.

This class wraps one the DataIO family of classes provided by BeOS, thereby allowing these classes to be used as devices.

Constructor & Destructor Documentation

◆ BeOSDevice() [1/3]

wfio::os::beos::BeOSDevice::BeOSDevice ( BDataIO *  io,
int *  error = NULL 
)
inline

Construct a new BEOSDevice from a BDataIO.

Parameters
fdThe BDataIO to wrap.
errorAn optional error indicator.

◆ BeOSDevice() [2/3]

wfio::os::beos::BeOSDevice::BeOSDevice ( BPositionIO *  io,
int *  error = NULL 
)
inline

Construct a new BEOSDevice from a BPositionIO.

Parameters
fdThe BPositionIO to wrap.
errorAn optional error indicator.

◆ BeOSDevice() [3/3]

wfio::os::beos::BeOSDevice::BeOSDevice ( BBufferIO *  io,
int *  error = NULL 
)
inline

Construct a new BEOSDevice from a BDataIO.

Parameters
fdThe BBufferIO to wrap.
errorAn optional error indicator.

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