00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef LWOGROUPCHUNK_H
00016 #define LWOGROUPCHUNK_H
00017
00018 #include "pandatoolbase.h"
00019
00020 #include "lwoChunk.h"
00021 #include "iffChunk.h"
00022
00023 #include "pointerTo.h"
00024
00025 #include "pvector.h"
00026
00027
00028
00029
00030
00031
00032 class LwoGroupChunk : public LwoChunk {
00033 public:
00034 int get_num_chunks() const;
00035 IffChunk *get_chunk(int n) const;
00036
00037 protected:
00038 bool read_chunks_iff(IffInputFile *in, size_t stop_at);
00039 bool read_subchunks_iff(IffInputFile *in, size_t stop_at);
00040 void write_chunks(ostream &out, int indent_level) const;
00041
00042 typedef pvector< PT(IffChunk) > Chunks;
00043 Chunks _chunks;
00044
00045 public:
00046 virtual TypeHandle get_type() const {
00047 return get_class_type();
00048 }
00049 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00050 static TypeHandle get_class_type() {
00051 return _type_handle;
00052 }
00053 static void init_type() {
00054 LwoChunk::init_type();
00055 register_type(_type_handle, "LwoGroupChunk",
00056 LwoChunk::get_class_type());
00057 }
00058
00059 private:
00060 static TypeHandle _type_handle;
00061 };
00062
00063 #endif
00064
00065