1 //===-- SaveCoreOptions.h ---------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLDB_SOURCE_PLUGINS_OBJECTFILE_SaveCoreOPTIONS_H 10 #define LLDB_SOURCE_PLUGINS_OBJECTFILE_SaveCoreOPTIONS_H 11 12 #include "lldb/Utility/FileSpec.h" 13 #include "lldb/lldb-forward.h" 14 #include "lldb/lldb-types.h" 15 16 #include <optional> 17 #include <string> 18 19 namespace lldb_private { 20 21 class SaveCoreOptions { 22 public: SaveCoreOptions()23 SaveCoreOptions(){}; 24 ~SaveCoreOptions() = default; 25 26 lldb_private::Status SetPluginName(const char *name); 27 std::optional<std::string> GetPluginName() const; 28 29 void SetStyle(lldb::SaveCoreStyle style); 30 lldb::SaveCoreStyle GetStyle() const; 31 32 void SetOutputFile(lldb_private::FileSpec file); 33 const std::optional<lldb_private::FileSpec> GetOutputFile() const; 34 35 void Clear(); 36 37 private: 38 std::optional<std::string> m_plugin_name; 39 std::optional<lldb_private::FileSpec> m_file; 40 std::optional<lldb::SaveCoreStyle> m_style; 41 }; 42 } // namespace lldb_private 43 44 #endif // LLDB_SOURCE_PLUGINS_OBJECTFILE_SaveCoreOPTIONS_H 45