Panda3D
recorderBase.cxx
1 // Filename: recorderBase.cxx
2 // Created by: drose (24Jan04)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "recorderBase.h"
16 
17 TypeHandle RecorderBase::_type_handle;
18 
19 ////////////////////////////////////////////////////////////////////
20 // Function: RecorderBase::Constructor
21 // Access: Protected
22 // Description:
23 ////////////////////////////////////////////////////////////////////
24 RecorderBase::
25 RecorderBase() {
26  _flags = 0;
27 }
28 
29 ////////////////////////////////////////////////////////////////////
30 // Function: RecorderBase::Destructor
31 // Access: Published, Virtual
32 // Description:
33 ////////////////////////////////////////////////////////////////////
34 RecorderBase::
35 ~RecorderBase() {
36  nassertv(_flags == 0);
37 }
38 
39 ////////////////////////////////////////////////////////////////////
40 // Function: RecorderBase::record_frame
41 // Access: Public, Virtual
42 // Description: Records the most recent data collected into the
43 // indicated datagram.
44 ////////////////////////////////////////////////////////////////////
45 void RecorderBase::
47 }
48 
49 ////////////////////////////////////////////////////////////////////
50 // Function: RecorderBase::play_frame
51 // Access: Public, Virtual
52 // Description: Reloads the most recent data collected from the
53 // indicated datagram.
54 ////////////////////////////////////////////////////////////////////
55 void RecorderBase::
57 }
58 
59 ////////////////////////////////////////////////////////////////////
60 // Function: RecorderBase::write_recorder
61 // Access: Public, Virtual
62 // Description: Writes the contents of this object to the datagram
63 // for encoding in the session file. This is very
64 // similar to write_datagram() for TypedWritable
65 // objects, but it is used specifically to write the
66 // Recorder object when generating the session file. In
67 // many cases, it will be the same as write_datagram().
68 //
69 // This balances with fillin_recorder().
70 ////////////////////////////////////////////////////////////////////
71 void RecorderBase::
73 }
74 
75 ////////////////////////////////////////////////////////////////////
76 // Function: RecorderBase::fillin_recorder
77 // Access: Protected
78 // Description: This internal function is called by make_recorder (in
79 // derived classes) to read in all of the relevant data
80 // from the session file. It balances with
81 // write_recorder().
82 ////////////////////////////////////////////////////////////////////
83 void RecorderBase::
84 fillin_recorder(DatagramIterator &, BamReader *) {
85 }
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Definition: bamReader.h:122
virtual void play_frame(DatagramIterator &scan, BamReader *manager)
Reloads the most recent data collected from the indicated datagram.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
Definition: bamWriter.h:73
virtual void record_frame(BamWriter *manager, Datagram &dg)
Records the most recent data collected into the indicated datagram.
virtual void write_recorder(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for encoding in the session file.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition: datagram.h:43