MrSID Decode SDK for LiDAR Reference Manual 1.1.5.5244
IO.h
Go to the documentation of this file.
1//
2// This code is property of Celartem, Inc dba Extensis.
3// Copyright (c) 1995-2023. All rights reserved.
4// Use permitted only under license from Extensis.
5//
6/* PUBLIC */
7
8#ifndef __LIDAR_IO_H__
9#define __LIDAR_IO_H__
10
11#include "lidar/Object.h"
12
13LT_BEGIN_LIDAR_NAMESPACE
14
25class IO : public Object
26{
28public:
33
55 virtual void open(void) = 0;
77 virtual void close(void) = 0;
78
89 virtual size_t pread(offset_type offset,
90 void *buffer,
91 size_t nbytes) const = 0;
102 virtual size_t pwrite(offset_type offset,
103 const void *buffer,
104 size_t nbytes) const = 0;
105
111 virtual offset_type size(void) const = 0;
112
122 virtual void truncate(offset_type length) = 0;
123
129 virtual void unlink(void) = 0;
130
131
136 struct Location
137 {
141
143
145 Location(const Location &rhs);
147
149 };
150};
151
152LT_END_LIDAR_NAMESPACE
153#endif // __LIDAR_IO_H__
long long int lt_int64
signed 64-bit integer
Definition: Base.h:42
#define ABSTRACT_OBJECT(classname)
Macros for defining boilerplate parts of derived Object classes.
Definition: Object.h:41
IO is the base class for binary input and output.
Definition: IO.h:26
lt_int64 offset_type
Integer data type for file offsets and sizes.
Definition: IO.h:32
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.
virtual void truncate(offset_type length)=0
Set the size of the resource.
virtual offset_type size(void) const =0
Get the size of the resource.
virtual void unlink(void)=0
Delete the resource when the IO object is deleted.
virtual void open(void)=0
Open the IO object.
virtual size_t pwrite(offset_type offset, const void *buffer, size_t nbytes) const =0
Write data.
Location is a helper structure for holding the location of data in a IO object.
Definition: IO.h:137
Location(const Location &rhs)
IO * io
Definition: IO.h:138
void set(IO *io, offset_type offset, offset_type length)
offset_type length
Definition: IO.h:140
Location(IO *io=nullptr, offset_type offset=0, offset_type length=0)
Location & operator=(const Location &rhs)
offset_type offset
Definition: IO.h:139
Object is the base class for implementing reference counting.
Definition: Object.h:31

Extensis