|
Revision 13041, 1.8 kB
(checked in by robert, 14 months ago)
|
|
Ran script to remove trailing spaces and tabs
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | #ifndef FLT_DATAINPUTSTREAM |
|---|
| 21 | #define FLT_DATAINPUTSTREAM 1 |
|---|
| 22 | |
|---|
| 23 | #include <istream> |
|---|
| 24 | #include <string> |
|---|
| 25 | #include <osg/Vec3f> |
|---|
| 26 | #include <osg/Vec3d> |
|---|
| 27 | #include <osg/Vec4f> |
|---|
| 28 | #include "Types.h" |
|---|
| 29 | |
|---|
| 30 | namespace flt { |
|---|
| 31 | |
|---|
| 32 | class Record; |
|---|
| 33 | |
|---|
| 34 | class DataInputStream : public std::istream |
|---|
| 35 | { |
|---|
| 36 | public: |
|---|
| 37 | |
|---|
| 38 | explicit DataInputStream(std::streambuf* sb); |
|---|
| 39 | |
|---|
| 40 | int8 readInt8(int8 def=0); |
|---|
| 41 | uint8 readUInt8(uint8 def=0); |
|---|
| 42 | int16 readInt16(int16 def=0); |
|---|
| 43 | uint16 readUInt16(uint16 def=0); |
|---|
| 44 | int32 readInt32(int32 def=0); |
|---|
| 45 | uint32 readUInt32(uint32 def=0); |
|---|
| 46 | float32 readFloat32(float32 def=0); |
|---|
| 47 | float64 readFloat64(float64 def=0); |
|---|
| 48 | void readCharArray(char* data, int size); |
|---|
| 49 | std::string readString(int size); |
|---|
| 50 | osg::Vec4f readColor32(); |
|---|
| 51 | osg::Vec2f readVec2f(); |
|---|
| 52 | osg::Vec3f readVec3f(); |
|---|
| 53 | osg::Vec4f readVec4f(); |
|---|
| 54 | osg::Vec3d readVec3d(); |
|---|
| 55 | |
|---|
| 56 | std::istream& forward(std::istream::off_type off); |
|---|
| 57 | |
|---|
| 58 | int16 peekInt16(); |
|---|
| 59 | |
|---|
| 60 | protected: |
|---|
| 61 | |
|---|
| 62 | bool _byteswap; |
|---|
| 63 | }; |
|---|
| 64 | |
|---|
| 65 | } |
|---|
| 66 | |
|---|
| 67 | #endif |
|---|