/src/libetonyek/src/lib/IWORKPropertyMap.cpp
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* |
3 | | * This file is part of the libetonyek project. |
4 | | * |
5 | | * This Source Code Form is subject to the terms of the Mozilla Public |
6 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
7 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
8 | | */ |
9 | | |
10 | | #include "IWORKPropertyMap.h" |
11 | | |
12 | | namespace libetonyek |
13 | | { |
14 | | |
15 | | IWORKPropertyMap::IWORKPropertyMap() |
16 | 33.2k | : m_map() |
17 | 33.2k | , m_parent(nullptr) |
18 | 33.2k | { |
19 | 33.2k | } |
20 | | |
21 | | IWORKPropertyMap::IWORKPropertyMap(const IWORKPropertyMap *const parent) |
22 | 0 | : m_map() |
23 | 0 | , m_parent(parent) |
24 | 0 | { |
25 | 0 | } |
26 | | |
27 | | IWORKPropertyMap::IWORKPropertyMap(const IWORKPropertyMap &other) |
28 | 32.1k | : m_map(other.m_map) |
29 | 32.1k | , m_parent(other.m_parent) |
30 | 32.1k | { |
31 | 32.1k | } |
32 | | |
33 | | IWORKPropertyMap &IWORKPropertyMap::operator=(const IWORKPropertyMap &other) |
34 | 0 | { |
35 | 0 | IWORKPropertyMap copy(other); |
36 | 0 | swap(copy); |
37 | 0 | return *this; |
38 | 0 | } |
39 | | |
40 | | void IWORKPropertyMap::swap(IWORKPropertyMap &other) |
41 | 0 | { |
42 | 0 | using std::swap; |
43 | 0 | swap(m_map, other.m_map); |
44 | 0 | swap(m_parent, other.m_parent); |
45 | 0 | } |
46 | | |
47 | | void IWORKPropertyMap::setParent(const IWORKPropertyMap *const parent) |
48 | 7.75k | { |
49 | 7.75k | m_parent = parent; |
50 | 7.75k | } |
51 | | |
52 | | } |
53 | | |
54 | | /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |