mclassmember.cpp 2.14 KB
Newer Older
1
/****************************************************************************
Jochen Becher's avatar
Jochen Becher committed
2
**
3 4
** Copyright (C) 2016 Jochen Becher
** Contact: https://www.qt.io/licensing/
Jochen Becher's avatar
Jochen Becher committed
5 6 7 8 9 10 11
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
12 13 14
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
Jochen Becher's avatar
Jochen Becher committed
15
**
16 17 18 19 20 21 22
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
Jochen Becher's avatar
Jochen Becher committed
23 24 25 26 27 28 29
**
****************************************************************************/

#include "mclassmember.h"

namespace qmt {

30
MClassMember::MClassMember(MemberType memberType)
31
    : m_visibility(VisibilityUndefined),
32
      m_memberType(memberType)
Jochen Becher's avatar
Jochen Becher committed
33 34 35 36 37
{
}

void MClassMember::setUid(const Uid &uid)
{
38
    m_uid = uid;
Jochen Becher's avatar
Jochen Becher committed
39 40 41 42
}

void MClassMember::renewUid()
{
43
    m_uid.renew();
Jochen Becher's avatar
Jochen Becher committed
44 45 46 47
}

void MClassMember::setStereotypes(const QList<QString> &stereotypes)
{
48
    m_stereotypes = stereotypes;
Jochen Becher's avatar
Jochen Becher committed
49 50 51 52
}

void MClassMember::setGroup(const QString &group)
{
53
    m_group = group;
Jochen Becher's avatar
Jochen Becher committed
54 55 56 57
}

void MClassMember::setDeclaration(const QString &declaration)
{
58
    m_declaration = declaration;
Jochen Becher's avatar
Jochen Becher committed
59 60 61 62
}

void MClassMember::setVisibility(MClassMember::Visibility visibility)
{
63
    m_visibility = visibility;
Jochen Becher's avatar
Jochen Becher committed
64 65
}

66
void MClassMember::setMemberType(MClassMember::MemberType memberType)
Jochen Becher's avatar
Jochen Becher committed
67
{
68
    m_memberType = memberType;
Jochen Becher's avatar
Jochen Becher committed
69 70 71 72
}

void MClassMember::setProperties(Properties properties)
{
73
    m_properties = properties;
Jochen Becher's avatar
Jochen Becher committed
74 75 76 77
}

bool operator==(const MClassMember &lhs, const MClassMember &rhs)
{
78
    return lhs.uid() == rhs.uid();
Jochen Becher's avatar
Jochen Becher committed
79 80
}

81
} // namespace qmt