input_crop Class Reference

#include <crop.h>

Inheritance diagram for input_crop:

input_ty

Public Member Functions

virtual ~input_crop ()
 input_crop (input &deeper, long length)
nstring name ()
long length ()
void keepalive ()
long read_inner (void *data, size_t nbytes)
long ftell_inner ()
bool is_remote () const
void set_name (const nstring &arg)

Private Member Functions

 input_crop ()
 input_crop (const input_crop &arg)
input_cropoperator= (const input_crop &arg)

Private Attributes

input deeper
long maximum
long pos
nstring name_cache

Detailed Description

The input_crop class is used to represent an input which will read only a portion of the deeper input, from the current position.

Definition at line 29 of file crop.h.


Constructor & Destructor Documentation

virtual input_crop::~input_crop (  )  [virtual]

The destructor.

input_crop::input_crop ( input deeper,
long  length 
)

The constructor.

Parameters:
deeper the data source for this filter.
length How many bytes of data are in the cropped region.

input_crop::input_crop (  )  [private]

The default constructor. Do not use.

input_crop::input_crop ( const input_crop arg  )  [private]

The copy constructor. Do not use.


Member Function Documentation

nstring input_crop::name (  )  [virtual]

The name method is used to determine the name of the input.

Implements input_ty.

long input_crop::length (  )  [virtual]

The length method is used to determine the length of the input. May return -1 if the length is unknown.

Implements input_ty.

void input_crop::keepalive (  )  [virtual]

The keepalive method is used to set the SO_KEEPALIVE socket option, if the file is a socket. Does nothing otherwise.

Reimplemented from input_ty.

long input_crop::read_inner ( void *  data,
size_t  nbytes 
) [virtual]

The read_inner method is used to read unbuffered data from the given input stream. At most nbytes bytes will be read into data. The number of bytes actually read will be returned. At end-of-file, a value <= 0 will be returned, and data will be unchanged. All file read errors or format errors are fatal, and will cause the method to not return.

Parameters:
data Where to put the results of the read.
nbytes The maximum number of bytes to read.
Returns:
The actual number of bytes read, or zero for end-of-file.

Implements input_ty.

long input_crop::ftell_inner (  )  [virtual]

The ftell_inner method is used to determine the unbuffered current position within the input.

Implements input_ty.

bool input_crop::is_remote (  )  const [virtual]

The is_remote method is used to determine whether or not an input stream is from a local file or a remote source. This is only intended to be a generally informative thing, to provide information to the user, it isn't (and can't be) utterly precise.

Reimplemented from input_ty.

void input_crop::set_name ( const nstring arg  )  [inline]

Definition at line 66 of file crop.h.

input_crop& input_crop::operator= ( const input_crop arg  )  [private]

The assignment operator. Do not use.


Field Documentation

The deeper instance variable is used to remember the data source for this filter.

Definition at line 73 of file crop.h.

long input_crop::maximum [private]

The deeper instance variable is used to remember how many bytes of data are in the cropped region.

Definition at line 79 of file crop.h.

long input_crop::pos [private]

The pos instance variable is used to remember where we are up to in the crop region.

Definition at line 85 of file crop.h.

The name_cache instance variable is used to remember the name of the deeper input stream.

Definition at line 91 of file crop.h.


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

Generated on Wed Mar 12 23:37:40 2008 for Aegis by  doxygen 1.5.5