HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CMD_History.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: CMD library (C++)
7  *
8  * COMMENTS: History logger for command library
9  *
10  */
11 
12 #ifndef __CMD_History_h__
13 #define __CMD_History_h__
14 
15 #include "CMD_API.h"
16 #include <UT/UT_ValArray.h>
17 #include <iosfwd>
18 
19 class UT_String;
20 class UT_WorkBuffer;
21 class CMD_History;
22 class CMD_Manager;
23 
25 {
26 public:
29 
30  //
31  // historyExpand returns 1 if substitution was made
32  int historyExpand(CMD_Manager *, UT_String &cmd);
33  void addHistory(const char *cmd);
34  //
35  // getEntry will return the most recent first. i.e. getEntry(0) returns
36  // the most recent command.
37  //
38  const char *getCommand(int n) const;
39  unsigned int entries() const { return myHistory.entries(); }
40 
41  void clearAndDestroy();
42  void saveHistory(std::ostream &os) const;
43 
44 private:
45  int editHistory(UT_String &cmd);
46  int getHistory(const char *pattern, UT_WorkBuffer &where);
47 
49 };
50 
51 #endif
unsigned int entries() const
Definition: CMD_History.h:39
GLdouble n
Definition: glcorearb.h:2007
#define CMD_API
Definition: CMD_API.h:10