/*
 * ALL YOUR Code, thoughts, ideas ARE BELONG to Dom Lachowicz <cinamod@hotmail.com>
 * Licensed under the GNU GPL v 2.0
 * http://www.fsf.org
 */

/* probably XAP_App or PD_Document */
typedef SomeClass Creator;

class XAP_Log
{
  friend class Creator; /* class type will be 
			   the second param to the constructor */
 public:

  // name and scope will probably change, but you get the idea...
  typedef struct _InternalData {
    char * szMethodName;
    EV_EditMethodData * pEm;

    _InternalData(const char * name, EV_EditMethodData * em);
    ~InternalData();
  } InternalData;

  void addCommand (const char * cmdName, const EV_EditMethodData * data, int where);
  void addCommand (const char * cmdName, const EV_EditMethodData * data);

  void removeNthCommand (int where);

  void moveCommand (int which, int to);

  const char * getName (void);

  void serialize (FILE * fp);

  void replay (void);
  void replay (int howMany);
  void replay (int start, int end);

  UT_Vector * getCommandVector (void);

  ~XAP_Log();

 protected:

  XAP_Log(const char * szName, Creator c);

 private:
  UT_Vector * p_impl;
  char * name;
};
