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 LLDB_CORE_MODULECHILD_H
10#define LLDB_CORE_MODULECHILD_H
11
12#include "lldb/lldb-forward.h"
13
14namespace 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.
20public:
21 /// Construct with owning module.
22 ///
23 /// \param[in] module_sp
24 /// The module that owns the object that inherits from this
25 /// class.
26 ModuleChild(const lldb::ModuleSP &module_sp);
27
28 /// Destructor.
30
31 /// Assignment operator.
32 ///
33 /// \param[in] rhs
34 /// A const ModuleChild class reference to copy.
35 ///
36 /// \return
37 /// A const reference to this object.
38 const ModuleChild &operator=(const ModuleChild &rhs);
39
40 /// Get const accessor for the module pointer.
41 ///
42 /// \return
43 /// A const pointer to the module that owns the object that
44 /// inherits from this class.
46
47 /// Set accessor for the module pointer.
48 ///
49 /// \param[in] module_sp
50 /// A new module that owns the object that inherits from this
51 /// class.
52 void SetModule(const lldb::ModuleSP &module_sp);
53
54protected:
55 /// The Module that owns the object that inherits from this class.
57};
58
59} // namespace lldb_private
60
61#endif // LLDB_CORE_MODULECHILD_H
A mix in class that contains a pointer back to the module that owns the object which inherits from it...
Definition: ModuleChild.h:19
const ModuleChild & operator=(const ModuleChild &rhs)
Assignment operator.
Definition: ModuleChild.cpp:18
void SetModule(const lldb::ModuleSP &module_sp)
Set accessor for the module pointer.
Definition: ModuleChild.cpp:26
lldb::ModuleWP m_module_wp
The Module that owns the object that inherits from this class.
Definition: ModuleChild.h:56
lldb::ModuleSP GetModule() const
Get const accessor for the module pointer.
Definition: ModuleChild.cpp:24
A class that represents a running process on the host machine.
std::weak_ptr< lldb_private::Module > ModuleWP
Definition: lldb-forward.h:374
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:373