Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

agl_ios.h File Reference

definition of all adgali features associated with ios More...

Go to the source code of this file.

Data Structures

struct  agl_ios
 defines an io stream More...

Defines

#define agl_ios_close(ios)   ((ios)->pio->close(ios))
 close the stream
#define agl_ios_read(ios, buf, size, maxnum, supp)   ((ios)->pio->read(ios, buf, size, maxnum ,supp))
 read the stream
#define agl_ios_seek(ios, offset, whence)   ((ios)->pio->seek(ios, offset, whence))
 seek into the stream
#define agl_ios_tell(ios)   ((ios)->pio->seek(ios, 0, SEEK_CUR))
 tell the position in the stream
#define agl_ios_write(ios, buf, size, maxnum, supp)   ((ios)->pio->write(ios, buf, size, maxnum ,supp))
 write into the stream

Typedefs

typedef agl_ios agl_ios
 defines an io stream


Detailed Description

this file defines all adgali features associated with ios and must be include when you use adgali this file is included by agl.h

Define Documentation

#define agl_ios_close ios   )     ((ios)->pio->close(ios))
 

this function close the stream

Parameters:
ios an agl_ios pointer which defines the stream
Returns:
nothing

#define agl_ios_read ios,
buf,
size,
maxnum,
supp   )     ((ios)->pio->read(ios, buf, size, maxnum ,supp))
 

this function read the stream into a buffer

Parameters:
ios an agl_ios pointer which defines the stream
buf point to the read buffer. The size of this buffer should be big enough to contain size * maxnum characters
size this is the size of one item
maxnum this the maximum number of item to read
supp this parameter is reserved for future use (socket for example)
Returns:
the number of items read

#define agl_ios_seek ios,
offset,
whence   )     ((ios)->pio->seek(ios, offset, whence))
 

this function seek in a stream

Parameters:
ios an agl_ios pointer which defines the stream
offset an offset in then stream. The value could be positive or negative
whence indicates the type of offset. see also seek(2) function.
  • SEEK_SET: force offset from the beginning of the stream
  • SEEK_CUR: force offset from the current position of the stream
  • SEEK_END: force offset from the end of the stream
Returns:
the offset from the beginning of the stream
Note:
the position of the stream could not be negative and greater than the stream size.

#define agl_ios_tell ios   )     ((ios)->pio->seek(ios, 0, SEEK_CUR))
 

this function tell the position of the read/write pointer in the stream

Parameters:
ios an agl_ios pointer which defines the stream
Returns:
the offset from the beginning of the stream

#define agl_ios_write ios,
buf,
size,
maxnum,
supp   )     ((ios)->pio->write(ios, buf, size, maxnum ,supp))
 

this function write a buffer into the stream

Parameters:
ios an agl_ios pointer which defines the stream
buf point to the write buffer. The size of this buffer should be big enough to contain size * maxnum characters
size this is the size of one item
maxnum this the maximum number of item to read
supp this parameter is reserved for future use (socket for example)
Returns:
the number of items written


Typedef Documentation

typedef struct agl_ios agl_ios
 

This structure defines io streams for adgali all the members are private. Don't use them directly


Doc generated at 29 Sep 2004 for, adgali 0.2.4 written by Stephane APIOU, © 2001 Generated by Doxygen 1.3.8 ,