1 | /* -*- C++ -*- |
---|---|
2 | A dependency between jobs. |
3 | |
4 | SPDX-FileCopyrightText: 2005-2013 Mirko Boehm <mirko@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.0-or-later |
7 | */ |
8 | |
9 | #include "dependency.h" |
10 | #include "jobinterface.h" |
11 | #include "managedjobpointer.h" |
12 | |
13 | namespace ThreadWeaver |
14 | { |
15 | Dependency::Dependency(const JobPointer &dependent, const JobPointer &dependee) |
16 | : m_dependent(dependent) |
17 | , m_dependee(dependee) |
18 | { |
19 | } |
20 | |
21 | Dependency::Dependency(JobInterface *dependent, JobInterface *dependee) |
22 | : m_dependent(ManagedJobPointer<JobInterface>(dependent)) |
23 | , m_dependee(ManagedJobPointer<JobInterface>(dependee)) |
24 | { |
25 | } |
26 | |
27 | Dependency::Dependency(const JobPointer &dependent, JobInterface *dependee) |
28 | : m_dependent(dependent) |
29 | , m_dependee(ManagedJobPointer<JobInterface>(dependee)) |
30 | { |
31 | } |
32 | |
33 | Dependency::Dependency(JobInterface *dependent, const JobPointer &dependee) |
34 | : m_dependent(ManagedJobPointer<JobInterface>(dependent)) |
35 | , m_dependee(dependee) |
36 | { |
37 | } |
38 | |
39 | JobPointer Dependency::dependent() const |
40 | { |
41 | return m_dependent; |
42 | } |
43 | |
44 | JobPointer Dependency::dependee() const |
45 | { |
46 | return m_dependee; |
47 | } |
48 | |
49 | } |
50 |