MrSID Decode SDK for LiDAR Reference Manual
1.1.2.4045
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
#include "
lidar/Mutex.h
"
17
18
LT_BEGIN_LIDAR_NAMESPACE
19
30
class
IO
:
public
Object
31
{
32
ABSTRACT_OBJECT(
IO
);
33
public
:
37
typedef
lt_int64
offset_type
;
38
45
void
open
(
void
);
52
void
close
(
void
);
53
64
virtual
size_t
pread
(
offset_type
offset,
65
void
*buffer,
66
size_t
nbytes)
const
= 0;
77
virtual
size_t
pwrite
(
offset_type
offset,
78
const
void
*buffer,
79
size_t
nbytes)
const
= 0;
80
86
virtual
offset_type
size
(
void
)
const
= 0;
87
97
virtual
void
truncate
(
offset_type
length) = 0;
98
104
virtual
void
unlink
(
void
) = 0;
105
106
111
struct
Location
112
{
113
IO
*
io
;
114
offset_type
offset
;
115
offset_type
length
;
116
117
~Location
(
void
);
118
119
Location
(
IO
*
io
= NULL,
offset_type
offset
= 0,
offset_type
length
= 0);
120
Location
(
const
Location
&rhs);
121
Location
&
operator=
(
const
Location
&rhs);
122
123
void
set
(
IO
*
io
,
offset_type
offset
,
offset_type
length
);
124
OVERRIDE_NEW
;
125
};
126
127
protected
:
133
virtual
void
popen
(
void
) = 0;
139
virtual
void
pclose
(
void
) = 0;
140
141
private
:
142
size_t
m_openCount;
143
Mutex
m_mutex;
144
};
145
146
LT_END_LIDAR_NAMESPACE
147
#endif // __LIDAR_IO_H__
LizardTech