MrSID Decode SDK for LiDAR Reference Manual 1.1.4.4709

- Main Page
- Classes
- Files

- File List
- File Members

IO.h
Go to the documentation of this file.
1 /* //////////////////////////////////////////////////////////////////////////
2 // //
3 // This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western //
4 // Avenue, Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
5 // prohibited. Access to and use of this code is permitted only under //
6 // license from LizardTech, Inc. Portions of the code are protected by //
7 // US and foreign patents and other filings. All Rights Reserved. //
8 // //
10 /* PUBLIC */
11
12 #ifndef __LIDAR_IO_H__
13 #define __LIDAR_IO_H__
14
15 #include "lidar/Object.h"
16
17 LT_BEGIN_LIDAR_NAMESPACE
18
29 class IO : public Object
30 {
31 ABSTRACT_OBJECT(IO);
32 public:
36 typedef lt_int64 offset_type;
37
59 virtual void open(void) = 0;
81 virtual void close(void) = 0;
82
93 virtual size_t pread(offset_type offset,
94 void *buffer,
95 size_t nbytes) const = 0;
106 virtual size_t pwrite(offset_type offset,
107 const void *buffer,
108 size_t nbytes) const = 0;
109
115 virtual offset_type size(void) const = 0;
116
126 virtual void truncate(offset_type length) = 0;
127
133 virtual void unlink(void) = 0;
134
135
140 struct Location
141 {
142 IO *io;
143 offset_type offset;
144 offset_type length;
145
146 ~Location(void);
147
148 Location(IO *io = NULL, offset_type offset = 0, offset_type length = 0);
149 Location(const Location &rhs);
150 Location &operator=(const Location &rhs);
151
152 void set(IO *io, offset_type offset, offset_type length);
153 };
154 };
155
156 LT_END_LIDAR_NAMESPACE
157 #endif // __LIDAR_IO_H__

LizardTech