Panda3D
|
00001 // Filename: recorderBase.cxx 00002 // Created by: drose (24Jan04) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "recorderBase.h" 00016 00017 TypeHandle RecorderBase::_type_handle; 00018 00019 //////////////////////////////////////////////////////////////////// 00020 // Function: RecorderBase::Constructor 00021 // Access: Protected 00022 // Description: 00023 //////////////////////////////////////////////////////////////////// 00024 RecorderBase:: 00025 RecorderBase() { 00026 _flags = 0; 00027 } 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Function: RecorderBase::Destructor 00031 // Access: Published, Virtual 00032 // Description: 00033 //////////////////////////////////////////////////////////////////// 00034 RecorderBase:: 00035 ~RecorderBase() { 00036 nassertv(_flags == 0); 00037 } 00038 00039 //////////////////////////////////////////////////////////////////// 00040 // Function: RecorderBase::record_frame 00041 // Access: Public, Virtual 00042 // Description: Records the most recent data collected into the 00043 // indicated datagram. 00044 //////////////////////////////////////////////////////////////////// 00045 void RecorderBase:: 00046 record_frame(BamWriter *, Datagram &) { 00047 } 00048 00049 //////////////////////////////////////////////////////////////////// 00050 // Function: RecorderBase::play_frame 00051 // Access: Public, Virtual 00052 // Description: Reloads the most recent data collected from the 00053 // indicated datagram. 00054 //////////////////////////////////////////////////////////////////// 00055 void RecorderBase:: 00056 play_frame(DatagramIterator &scan, BamReader *manager) { 00057 } 00058 00059 //////////////////////////////////////////////////////////////////// 00060 // Function: RecorderBase::write_recorder 00061 // Access: Public, Virtual 00062 // Description: Writes the contents of this object to the datagram 00063 // for encoding in the session file. This is very 00064 // similar to write_datagram() for TypedWritable 00065 // objects, but it is used specifically to write the 00066 // Recorder object when generating the session file. In 00067 // many cases, it will be the same as write_datagram(). 00068 // 00069 // This balances with fillin_recorder(). 00070 //////////////////////////////////////////////////////////////////// 00071 void RecorderBase:: 00072 write_recorder(BamWriter *, Datagram &) { 00073 } 00074 00075 //////////////////////////////////////////////////////////////////// 00076 // Function: RecorderBase::fillin_recorder 00077 // Access: Protected 00078 // Description: This internal function is called by make_recorder (in 00079 // derived classes) to read in all of the relevant data 00080 // from the session file. It balances with 00081 // write_recorder(). 00082 //////////////////////////////////////////////////////////////////// 00083 void RecorderBase:: 00084 fillin_recorder(DatagramIterator &, BamReader *) { 00085 }