GEOS
3.9.1dev
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
geos
io
ByteOrderDataInStream.h
Go to the documentation of this file.
1
/**********************************************************************
2
*
3
* GEOS - Geometry Engine Open Source
4
* http://geos.osgeo.org
5
*
6
* Copyright (C) 2005-2006 Refractions Research Inc.
7
* Copyright (C) 2001-2002 Vivid Solutions Inc.
8
*
9
* This is free software; you can redistribute and/or modify it under
10
* the terms of the GNU Lesser General Public Licence as published
11
* by the Free Software Foundation.
12
* See the COPYING file for more information.
13
*
14
**********************************************************************
15
*
16
* Last port: io/ByteOrderDataInStream.java rev. 1.1 (JTS-1.10)
17
*
18
**********************************************************************/
19
20
#ifndef GEOS_IO_BYTEORDERDATAINSTREAM_H
21
#define GEOS_IO_BYTEORDERDATAINSTREAM_H
22
23
#include <
geos/export.h
>
24
25
//#include <geos/io/ParseException.h>
26
//#include <geos/io/ByteOrderValues.h>
27
#include <
geos/inline.h
>
28
29
#include <iosfwd>
// ostream, istream (if we remove inlines)
30
31
namespace
geos
{
32
namespace
io {
33
41
class
GEOS_DLL
ByteOrderDataInStream
{
42
43
public
:
44
45
ByteOrderDataInStream
(std::istream* s =
nullptr
);
46
47
~
ByteOrderDataInStream
();
48
53
void
setInStream(std::istream* s);
54
55
void
setOrder(
int
order);
56
57
unsigned
char
readByte();
// throws ParseException
58
59
int
readInt();
// throws ParseException
60
61
long
readLong();
// throws ParseException
62
63
double
readDouble();
// throws ParseException
64
65
private
:
66
int
byteOrder
;
67
std::istream*
stream
;
68
69
// buffers to hold primitive datatypes
70
unsigned
char
buf[8];
71
72
};
73
74
}
// namespace io
75
}
// namespace geos
76
77
#ifdef GEOS_INLINE
78
#include <geos/io/ByteOrderDataInStream.inl>
79
#endif
80
81
#endif // #ifndef GEOS_IO_BYTEORDERDATAINSTREAM_H
GEOS_DLL
#define GEOS_DLL
Definition:
export.h:28
geos::io::ByteOrderDataInStream::byteOrder
int byteOrder
Definition:
ByteOrderDataInStream.h:66
inline.h
export.h
geos::io::ByteOrderDataInStream
Allows reading an stream of primitive datatypes from an underlying istream, with the representation b...
Definition:
ByteOrderDataInStream.h:41
geos
Basic namespace for all GEOS functionalities.
Definition:
IndexedNestedRingTester.h:26
geos::io::ByteOrderDataInStream::stream
std::istream * stream
Definition:
ByteOrderDataInStream.h:67
Generated by
1.8.11