Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libcore
parser
SWFParser.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3
// Free Software Foundation, Inc
4
//
5
// This program is free software; you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation; either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19
// The SWFMovieDefinition is the 'root' definition of a SWF movie, including
20
// movies loaded into another SWF file. Each self-contained SWF file has exactly
21
// one SWFMovieDefinition.
22
23
#ifndef GNASH_SWFPARSER_H
24
#define GNASH_SWFPARSER_H
25
26
#include "
SWF.h
"
27
28
namespace
gnash {
29
class
SWFStream;
30
class
movie_definition;
31
class
RunResources;
32
}
33
34
namespace
gnash {
35
36
38
//
41
//
46
//
50
class
SWFParser
51
{
52
53
public
:
54
SWFParser
(
SWFStream
& in,
movie_definition
* md,
const
RunResources
& runResources)
55
:
56
_stream(in),
57
_md(md),
58
_runResources(runResources),
59
_bytesRead(0),
60
_tagOpen(false),
61
_endRead(0),
62
_nextTagEnd(0)
63
64
{
65
}
66
68
size_t
bytesRead
()
const
{
69
return
_bytesRead;
70
}
71
73
//
77
//
81
//
85
bool
read
(std::streamsize bytes);
86
87
private
:
88
89
size_t
openTag();
90
91
void
closeTag();
92
93
SWFStream
& _stream;
94
95
movie_definition
* _md;
96
97
const
RunResources
& _runResources;
98
99
size_t
_bytesRead;
100
101
bool
_tagOpen;
102
103
size_t
_endRead;
104
105
size_t
_nextTagEnd;
106
107
SWF::TagType
_tag;
108
109
};
110
111
}
// namespace gnash
112
113
#endif
Generated on Sat Jun 30 2012 00:52:50 for Gnash by
1.8.1.1