1 //===-- ModuleChild.h -------------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_ModuleChild_h_
10 #define liblldb_ModuleChild_h_
12 #include "lldb/lldb-forward.h"
14 namespace lldb_private {
16 /// \class ModuleChild ModuleChild.h "lldb/Core/ModuleChild.h"
17 /// A mix in class that contains a pointer back to the module
18 /// that owns the object which inherits from it.
21 /// Construct with owning module.
23 /// \param[in] module_sp
24 /// The module that owns the object that inherits from this
26 ModuleChild(const lldb::ModuleSP &module_sp);
31 /// Assignment operator.
34 /// A const ModuleChild class reference to copy.
37 /// A const reference to this object.
38 const ModuleChild &operator=(const ModuleChild &rhs);
40 /// Get const accessor for the module pointer.
43 /// A const pointer to the module that owns the object that
44 /// inherits from this class.
45 lldb::ModuleSP GetModule() const;
47 /// Set accessor for the module pointer.
49 /// \param[in] module_sp
50 /// A new module that owns the object that inherits from this
52 void SetModule(const lldb::ModuleSP &module_sp);
55 /// The Module that owns the object that inherits from this class.
56 lldb::ModuleWP m_module_wp;
59 } // namespace lldb_private
61 #endif // liblldb_ModuleChild_h_