12 #ifndef __LIDAR_IO_H__
13 #define __LIDAR_IO_H__
17 LT_BEGIN_LIDAR_NAMESPACE
59 virtual void open(
void) = 0;
81 virtual void close(
void) = 0;
93 virtual size_t pread(offset_type offset,
95 size_t nbytes)
const = 0;
106 virtual size_t pwrite(offset_type offset,
108 size_t nbytes)
const = 0;
115 virtual offset_type
size(
void)
const = 0;
126 virtual void truncate(offset_type length) = 0;
133 virtual void unlink(
void) = 0;
148 Location(
IO *io = NULL, offset_type offset = 0, offset_type length = 0);
152 void set(
IO *io, offset_type offset, offset_type length);
157 LT_END_LIDAR_NAMESPACE
158 #endif // __LIDAR_IO_H__
Location(IO *io=NULL, offset_type offset=0, offset_type length=0)
Location & operator=(const Location &rhs)
virtual offset_type size(void) const =0
Get the size of the resource.
void set(IO *io, offset_type offset, offset_type length)
Location is a helper structure for holding the location of data in a IO object.
Object is the base class for implementing reference counting.
virtual void open(void)=0
Open the IO object.
virtual void truncate(offset_type length)=0
Set the size of the resource.
virtual void unlink(void)=0
Delete the resource when the IO object is deleted.
virtual size_t pwrite(offset_type offset, const void *buffer, size_t nbytes) const =0
Write data.
IO is the base class for binary input and output.
virtual void close(void)=0
Close the IO object.
virtual size_t pread(offset_type offset, void *buffer, size_t nbytes) const =0
Read data.
long long int lt_int64
signed 64-bit integer
lt_int64 offset_type
Integer data type for file offsets and sizes.