LLDB  mainline
ModuleChild.h
Go to the documentation of this file.
1 //===-- ModuleChild.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 liblldb_ModuleChild_h_
10 #define liblldb_ModuleChild_h_
11 
12 #include "lldb/lldb-forward.h"
13 
14 namespace lldb_private {
15 
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.
19 class ModuleChild {
20 public:
21  /// Construct with owning module.
22  ///
23  /// \param[in] module
24  /// The module that owns the object that inherits from this
25  /// class.
26  ModuleChild(const lldb::ModuleSP &module_sp);
27 
28  /// Copy constructor.
29  ///
30  /// \param[in] rhs
31  /// A const ModuleChild class reference to copy.
32  ModuleChild(const ModuleChild &rhs);
33 
34  /// Destructor.
35  ~ModuleChild();
36 
37  /// Assignment operator.
38  ///
39  /// \param[in] rhs
40  /// A const ModuleChild class reference to copy.
41  ///
42  /// \return
43  /// A const reference to this object.
44  const ModuleChild &operator=(const ModuleChild &rhs);
45 
46  /// Get const accessor for the module pointer.
47  ///
48  /// \return
49  /// A const pointer to the module that owns the object that
50  /// inherits from this class.
51  lldb::ModuleSP GetModule() const;
52 
53  /// Set accessor for the module pointer.
54  ///
55  /// \param[in] module
56  /// A new module that owns the object that inherits from this
57  /// class.
58  void SetModule(const lldb::ModuleSP &module_sp);
59 
60 protected:
61  // Member variables
62  lldb::ModuleWP m_module_wp; ///< The Module that owns the object that inherits
63  ///< from this class.
64 };
65 
66 } // namespace lldb_private
67 
68 #endif // liblldb_ModuleChild_h_
const ModuleChild & operator=(const ModuleChild &rhs)
Assignment operator.
Definition: ModuleChild.cpp:21
~ModuleChild()
Destructor.
Definition: ModuleChild.cpp:19
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
lldb::ModuleWP m_module_wp
The Module that owns the object that inherits from this class.
Definition: ModuleChild.h:62
lldb::ModuleSP GetModule() const
Get const accessor for the module pointer.
Definition: ModuleChild.cpp:27
void SetModule(const lldb::ModuleSP &module_sp)
Set accessor for the module pointer.
Definition: ModuleChild.cpp:29
ModuleChild(const lldb::ModuleSP &module_sp)
Construct with owning module.
Definition: ModuleChild.cpp:13
A mix in class that contains a pointer back to the module that owns the object which inherits from it...
Definition: ModuleChild.h:19