1 #if 0 // this file is not used
2 /* === S Y N F I G ========================================================= */
4 ** \brief Template Header
9 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
11 ** This package is free software; you can redistribute it and/or
12 ** modify it under the terms of the GNU General Public License as
13 ** published by the Free Software Foundation; either version 2 of
14 ** the License, or (at your option) any later version.
16 ** This package is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ** General Public License for more details.
22 /* ========================================================================= */
24 /* === S T A R T =========================================================== */
26 #ifndef __SYNFIG_NODEBASE_H
27 #define __SYNFIG_NODEBASE_H
29 /* === H E A D E R S ======================================================= */
34 #include <sigc++/slot.h>
36 /* === M A C R O S ========================================================= */
38 #define PX_DEFINE_DATA(name,type) \
39 PX_DEFINE_FUNC_CONST0(get_##name, type) \
40 PX_DEFINE_FUNC1(set_##name, void, type)
42 #define PX_DEFINE_FUNC0(name,ret) \
43 sigc::slot< ret > _slot_##name; \
45 return _slot_##name(); \
48 #define PX_DEFINE_FUNC1(name,ret,type) \
49 sigc::slot< ret, type > _slot_##name; \
51 return _slot_##name(v1); \
53 #define PX_DEFINE_FUNC2(name,ret,type1,type2) \
54 sigc::slot< ret, type1, type2 > _slot_##name; \
55 ret name(type1 v1, type2 v2) { \
56 return _slot_##name(v1,v2); \
58 #define PX_DEFINE_FUNC_CONST0(name,ret) \
59 sigc::slot< ret > _slot_##name##_const; \
61 return _slot_##name##_const(); \
64 /* === T Y P E D E F S ===================================================== */
66 /* === C L A S S E S & S T R U C T S ======================================= */
74 class NodeBase : public Protocol
78 PX_DEFINE_DATA(guid, GUID)
80 PX_DEFINE_FUNC2(func_test, float, int, int)
82 PX_DEFINE_DATA(id, String)
84 PX_DEFINE_DATA(root, NodeHandle)
86 PX_DEFINE_FUNC0(signal_changed, sigc::signal<void>)
87 PX_DEFINE_FUNC0(signal_deleted, sigc::signal<void>)
89 PX_DEFINE_FUNC_CONST0(get_parents, NodeList)
90 PX_DEFINE_FUNC_CONST0(get_children, NodeList)
92 PX_DEFINE_FUNC1(query_children, NodeList, Query)
94 }; // END of class Proto::NodeBase
96 }; // END of namespace Proto
97 }; // END of namespace synfig
99 /* === E N D =============================================================== */