/*****************************************************************************
 * $LastChangedDate: 2011-04-09 21:58:06 -0400 (Sat, 09 Apr 2011) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Replay animation of an Aircraft.
 *//*
 * LEGAL:   COPYRIGHT (C) 2008 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef CONTROL_REPLAY_HH
#define CONTROL_REPLAY_HH 1

#include "object/module.hh"
#include "object/aircraft.hh"
using namespace object;
#include "control/typesig_defs.hh"
#include "control/command.hh"

namespace control {

class ReplayPlayer;
class ReplayRecorder;

////////////////////////////////////////////////////////////////////////////////
/// @brief Replay animation of a Aircraft.
///
/// Implementation (see module.txt):
/// Replay is an interface class composed of player and recorder objects.
///
class Replay : public Shared
{
PREVENT_COPYING(Replay)
public:
                    Replay( shptr<Aircraft> aircraft,
                            const Milliseconds freq,
                            const Command::ExecuteMode commandExecuteMode );
                    ~Replay();
    bool            Record( void );
    bool            Play( void );
    void            Stop( void );
    bool            IfPlaying( void ) const;
    bool            Save( const string& filename );
    bool            Load( const string& filename );

private:
    shptr<Aircraft>         mAircraft;
    shptr<ReplayRecorder>   mRecorder;
    shptr<ReplayPlayer>     mPlayer;
public:
    DECLARE_TYPESIG(TYPESIG_REPLAY)
};

} // namespace control

#endif // CONTROL_REPLAY_HH
