21 return _header._start_time;
31 _header._random_seed = random_seed;
41 return _header._random_seed;
49 return (_writer !=
nullptr);
57 return (_reader !=
nullptr);
105 return _frame_offset;
120 _user_table_modified =
true;
127 recorder->_flags |= RecorderBase::F_recording;
181 if (recorder !=
nullptr) {
182 recorder->_flags &= ~(RecorderBase::F_recording | RecorderBase::F_playing);
185 _user_table_modified =
true;
204 _frame_tie = frame_tie;
220 if (_factory ==
nullptr) {
229 INLINE
void RecorderController::
231 _factory =
new RecorderFactory;
bool has_recorder(const std::string &name) const
Returns true if the named recorder has been added to the table by a previous call to add_recorder(),...
bool is_error()
Returns true if the controller has been opened for input or output output and there is an error on th...
A Factory can be used to create an instance of a particular subclass of some general base class.
bool remove_recorder(const std::string &name)
Removes the named recorder from the table.
void set_frame_tie(bool frame_tie)
Sets the frame_tie flag.
static RecorderFactory * get_factory()
Returns the global RecorderFactory for generating TypedWritable objects.
void set_random_seed(int random_seed)
Indicates an arbitrary number to be recorded in the session file as a random seed,...
bool is_recording() const
Returns true if the controller has been opened for output, false otherwise.
bool is_open() const
Returns true if the controller has been opened for either input or output, false otherwise.
const Filename & get_filename() const
Returns the filename that was passed to the most recent call to begin_record() or begin_playback().
virtual bool is_error()
Returns true if the file has reached an error condition.
int get_random_seed() const
Returns the random seed that was set by a previous call to set_random_seed(), or the number read from...
int get_frame_offset() const
Returns the delta offset between the actual frame count and the frame count written to the log.
The name of a file, such as a texture file or an Egg file.
This is the base class to a number of objects that record particular kinds of user input (like a Mous...
void add_recorder(const std::string &name, RecorderBase *recorder)
Adds the named recorder to the set of recorders.
RecorderBase * get_recorder(const std::string &name) const
Returns the recorder with the indicated name, or NULL if there is no such recorder.
bool get_frame_tie() const
See set_frame_tie().
time_t get_start_time() const
Returns the time (and date) at which the current session was originally recorded (or,...
RecorderBase * get_recorder(const std::string &name) const
Returns the recorder with the indicated name, or NULL if there is no such recorder.
bool remove_recorder(const std::string &name)
Removes the named recorder from the table.
double get_clock_offset() const
Returns the delta offset between the actual frame time and the frame time written to the log.
bool is_playing() const
Returns true if the controller has been opened for input, false otherwise.
void add_recorder(const std::string &name, RecorderBase *recorder)
Adds the named recorder to the set of recorders that are in use.