22 #ifndef GNASH_ABC_BLOCK_H
23 #define GNASH_ABC_BLOCK_H
32 #include <boost/scoped_array.hpp>
43 class ClasstHierarchy;
124 return finalize(block, _classTarget, _static);
135 boost::uint32_t _slotID;
136 boost::uint32_t _typeIndex;
137 boost::uint32_t _classInfoIndex;
159 inline void checkBounds(
size_t i,
const T& container)
161 if (i >= container.size()) {
162 throw std::range_error(
"Attempt to access pool out of range");
272 const std::vector<abc::Class*>&
scripts()
const {
277 checkBounds(i, _uIntegerPool);
278 return _uIntegerPool[
i];
282 checkBounds(i, _stringPool);
283 return _stringPool[
i];
287 checkBounds(i, _integerPool);
288 return _integerPool[
i];
292 checkBounds(i, _doublePool);
293 return _doublePool[
i];
297 checkBounds(i, _methods);
302 checkBounds(i, _multinamePool);
303 return _multinamePool[
i];
307 checkBounds(i, _classes);
312 checkBounds(i, _namespacePool);
313 return _namespacePool[
i];
325 bool read_integer_constants();
326 bool read_unsigned_integer_constants();
327 bool read_double_constants();
328 bool read_string_constants();
329 bool read_namespaces();
330 bool read_namespace_sets();
331 bool read_multinames();
332 bool read_method_infos();
333 bool skip_metadata();
334 bool read_instances();
337 bool read_method_bodies();
339 void check_multiname_name(boost::uint32_t name);
341 void check_multiname_namespace(boost::uint32_t ns);
343 void check_multiname_namespaceset(boost::uint32_t nsset);
349 std::vector<boost::int32_t> _integerPool;
350 std::vector<boost::uint32_t> _uIntegerPool;
351 std::vector<double> _doublePool;
352 std::vector<std::string> _stringPool;
353 std::vector<Namespace*> _namespacePool;
354 std::vector<NamespaceSet> _namespaceSetPool;
356 std::vector<MultiName> _multinamePool;
357 std::vector<Class*> _classes;
358 std::vector<Class*> _scripts;
366 boost::uint32_t mVersion;