00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef RECORDERHEADER_H
00016 #define RECORDERHEADER_H
00017
00018 #include "pandabase.h"
00019 #include "recorderBase.h"
00020 #include "typedWritable.h"
00021
00022 #include <time.h>
00023
00024 class BamWriter;
00025 class BamReader;
00026 class FactoryParams;
00027
00028
00029
00030
00031
00032
00033 class EXPCL_PANDA_RECORDER RecorderHeader : public TypedWritable {
00034 public:
00035 INLINE RecorderHeader();
00036 INLINE RecorderHeader(const RecorderHeader ©);
00037 INLINE void operator = (const RecorderHeader ©);
00038 INLINE ~RecorderHeader();
00039
00040 time_t _start_time;
00041 int _random_seed;
00042
00043 public:
00044 static void register_with_read_factory();
00045 virtual void write_datagram(BamWriter *manager, Datagram &dg);
00046
00047 protected:
00048 static TypedWritable *make_from_bam(const FactoryParams ¶ms);
00049 void fillin(DatagramIterator &scan, BamReader *manager);
00050
00051 public:
00052 static TypeHandle get_class_type() {
00053 return _type_handle;
00054 }
00055 static void init_type() {
00056 TypedWritable::init_type();
00057 register_type(_type_handle, "RecorderHeader",
00058 TypedWritable::get_class_type());
00059 }
00060 virtual TypeHandle get_type() const {
00061 return get_class_type();
00062 }
00063 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00064
00065 private:
00066 static TypeHandle _type_handle;
00067 };
00068
00069 #include "recorderHeader.I"
00070
00071 #endif
00072