1 | // Aseprite Document Library |
2 | // Copyright (c) 2001-2017 David Capello |
3 | // |
4 | // This file is released under the terms of the MIT license. |
5 | // Read LICENSE.txt for more information. |
6 | |
7 | #ifndef DOC_WITH_USER_DATA_H_INCLUDED |
8 | #define DOC_WITH_USER_DATA_H_INCLUDED |
9 | #pragma once |
10 | |
11 | #include "doc/object.h" |
12 | #include "doc/user_data.h" |
13 | |
14 | namespace doc { |
15 | |
16 | class WithUserData : public Object { |
17 | public: |
18 | WithUserData(ObjectType type) : Object(type) { |
19 | } |
20 | |
21 | const UserData& userData() const { return m_userData; } |
22 | UserData& userData() { return m_userData; } |
23 | |
24 | void setUserData(const UserData& userData) { |
25 | m_userData = userData; |
26 | } |
27 | |
28 | private: |
29 | UserData m_userData; |
30 | }; |
31 | |
32 | } // namespace doc |
33 | |
34 | #endif |
35 | |