root/OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/RecordInputStream.h @ 13041

Revision 13041, 1.4 kB (checked in by robert, 3 years 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/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14//
15// OpenFlight® loader for OpenSceneGraph
16//
17//  Copyright (C) 2005-2007  Brede Johansen
18//
19
20#ifndef FLT_RECORDINPUTSTREAM_H
21#define FLT_RECORDINPUTSTREAM_H 1
22
23#include "Record.h"
24#include "DataInputStream.h"
25
26namespace flt {
27
28class Document;
29
30typedef int opcode_type;
31typedef std::streamsize size_type;
32
33class RecordInputStream : public DataInputStream
34{
35    public:
36
37        explicit RecordInputStream(std::streambuf* sb);
38
39        bool readRecord(Document&);
40        bool readRecordBody(opcode_type, size_type, Document&);
41
42        inline std::streamsize getRecordSize() const { return _recordSize; }
43        inline std::streamsize getRecordBodySize() const { return _recordSize-(std::streamsize)4; }
44
45    protected:
46
47        std::streamsize _recordSize;
48};
49
50} // end namespace
51
52#endif
Note: See TracBrowser for help on using the browser.