IWORKPropertyInfo.h Source File documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

IWORKPropertyInfo.h
Go to the documentation of this file.
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 #ifndef IWORKPROPERTYINFO_H_INCLUDED
11 #define IWORKPROPERTYINFO_H_INCLUDED
12
13 #include <string>
14
15 namespace libetonyek
16 {
17
18 typedef std::string IWORKPropertyID_t;
19
20 template<typename Name>
21 struct IWORKPropertyInfo
22 {
23 // typedef Foo ValueType;
24 // static const IWORKPropertyID_t id;
25 };
26
27 #define IWORK_DECLARE_PROPERTY(name, type) \
28 namespace property { \
29 struct name {}; \
30 } \
31 \
32 template<> \
33 struct IWORKPropertyInfo<property::name> \
34 { \
35 typedef type ValueType; \
36 static const IWORKPropertyID_t id; \
37 }
38
39 #define IWORK_IMPLEMENT_PROPERTY(name) \
40 const IWORKPropertyID_t IWORKPropertyInfo<property::name>::id = #name
41
42 }
43
44 #endif // IWORKPROPERTYINFO_H_INCLUDED
45
46 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek
Definition: IWORKBezierElement.cpp:18
libetonyek::IWORKPropertyInfo
Definition: IWORKPropertyInfo.h:21
libetonyek::IWORKToken::string
Definition: IWORKToken.h:252
libetonyek::IWORKPropertyID_t
std::string IWORKPropertyID_t
Definition: IWORKPropertyInfo.h:18