1 //===-- CommandHistory.h ----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_CommandHistory_h_
11 #define liblldb_CommandHistory_h_
18 // Other libraries and framework includes
21 #include "lldb/lldb-private.h"
22 #include "lldb/Core/Stream.h"
23 #include "lldb/Host/Mutex.h"
25 namespace lldb_private {
41 FindString (const char* input_str) const;
44 GetStringAtIndex (size_t idx) const;
47 operator [] (size_t idx) const;
50 GetRecentmostString () const;
53 AppendString (const std::string& str,
54 bool reject_if_dupe = true);
62 size_t stop_idx = SIZE_MAX) const;
64 static const char g_repeat_char = '!';
67 DISALLOW_COPY_AND_ASSIGN(CommandHistory);
69 typedef std::vector<std::string> History;
70 mutable Mutex m_mutex;
74 } // namespace lldb_private
76 #endif // liblldb_CommandHistory_h_