aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/modelinglib/qmt/diagram/dinheritance.cpp
blob: 4827263f0daa7374581defdc7e750112d85cc6e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (C) 2016 Jochen Becher
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0

#include "dinheritance.h"

#include "dclass.h"
#include "dvisitor.h"
#include "dconstvisitor.h"

namespace qmt {

DInheritance::DInheritance()
    : DRelation()
{
}

DInheritance::~DInheritance()
{
}

Uid DInheritance::derived() const
{
    return endAUid();
}

void DInheritance::setDerived(const Uid &derived)
{
    setEndAUid(derived);
}

Uid DInheritance::base() const
{
    return endBUid();
}

void DInheritance::setBase(const Uid &base)
{
    setEndBUid(base);
}

void DInheritance::accept(DVisitor *visitor)
{
    visitor->visitDInheritance(this);
}

void DInheritance::accept(DConstVisitor *visitor) const
{
    visitor->visitDInheritance(this);
}

} // namespace qmt