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
20 #include "lldb/lldb-private.h"
21 #include "lldb/Core/Stream.h"
22 #include "lldb/Host/Mutex.h"
24 namespace lldb_private {
40 FindString (const char* input_str) const;
43 GetStringAtIndex (size_t idx) const;
46 operator [] (size_t idx) const;
49 GetRecentmostString () const;
52 AppendString (const std::string& str,
53 bool reject_if_dupe = true);
61 size_t stop_idx = SIZE_MAX) const;
63 static const char g_repeat_char = '!';
66 DISALLOW_COPY_AND_ASSIGN(CommandHistory);
68 typedef std::vector<std::string> History;
69 mutable Mutex m_mutex;
73 } // namespace lldb_private
75 #endif // liblldb_CommandHistory_h_