]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Core/ModuleChild.h
Update from libxo-0.8.1 to 0.8.4:
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Core / ModuleChild.h
1 //===-- ModuleChild.h -------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_ModuleChild_h_
11 #define liblldb_ModuleChild_h_
12
13 #include "lldb/lldb-forward.h"
14
15 namespace lldb_private {
16
17 //----------------------------------------------------------------------
18 /// @class ModuleChild ModuleChild.h "lldb/Core/ModuleChild.h"
19 /// @brief A mix in class that contains a pointer back to the module
20 ///        that owns the object which inherits from it.
21 //----------------------------------------------------------------------
22 class ModuleChild {
23 public:
24   //------------------------------------------------------------------
25   /// Construct with owning module.
26   ///
27   /// @param[in] module
28   ///     The module that owns the object that inherits from this
29   ///     class.
30   //------------------------------------------------------------------
31   ModuleChild(const lldb::ModuleSP &module_sp);
32
33   //------------------------------------------------------------------
34   /// Copy constructor.
35   ///
36   /// @param[in] rhs
37   ///     A const ModuleChild class reference to copy.
38   //------------------------------------------------------------------
39   ModuleChild(const ModuleChild &rhs);
40
41   //------------------------------------------------------------------
42   /// Destructor.
43   //------------------------------------------------------------------
44   ~ModuleChild();
45
46   //------------------------------------------------------------------
47   /// Assignment operator.
48   ///
49   /// @param[in] rhs
50   ///     A const ModuleChild class reference to copy.
51   ///
52   /// @return
53   ///     A const reference to this object.
54   //------------------------------------------------------------------
55   const ModuleChild &operator=(const ModuleChild &rhs);
56
57   //------------------------------------------------------------------
58   /// Get const accessor for the module pointer.
59   ///
60   /// @return
61   ///     A const pointer to the module that owns the object that
62   ///     inherits from this class.
63   //------------------------------------------------------------------
64   lldb::ModuleSP GetModule() const;
65
66   //------------------------------------------------------------------
67   /// Set accessor for the module pointer.
68   ///
69   /// @param[in] module
70   ///     A new module that owns the object that inherits from this
71   ///      class.
72   //------------------------------------------------------------------
73   void SetModule(const lldb::ModuleSP &module_sp);
74
75 protected:
76   //------------------------------------------------------------------
77   // Member variables
78   //------------------------------------------------------------------
79   lldb::ModuleWP m_module_wp; ///< The Module that owns the object that inherits
80                               ///< from this class.
81 };
82
83 } // namespace lldb_private
84
85 #endif // liblldb_ModuleChild_h_