1 /***************************************************************************
2 * Copyright (C) 2008 by NalaGinrut *
3 * suimualatsuki@163.com *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
23 #include <sys/types.h>
24 #include "COO_EXCEPTION.h"
25 //×¢Ò⣬ÀàÀïÃæʵ¼ÊûÓй¹Ô캯ÊýºÍÎö¹¹º¯Êý£¬
26 //ÎÒÔÚNewClass¹Ø¼üº¯ÊýÖÐͨ¹ýÖ´ÐÐÀàÐÍͬÃûº¯ÊýÀ´Ä£ÄâÕâÖÖÌØÐÔ£»
27 #define C_Class struct
28 #define C_Interface struct
41 #define SetData(attribute,value) do{ \
44 #define SetFunc(interface,func) SetData(interface,func);
46 #define InitInterface(class,interface,name) do{ \
47 class->interface=name; \
50 #define NewClass(type,class) ({ \
55 #define DeleteClass(class) \
57 class->DestoryClass(); \
60 #define NewAtrib(type,var) \
63 (type *) var->value; \
64 var->get=attrib_get; \
65 var->set=attrib_set; \
68 #define IsEqu(x,y) (x)==(y)
69 #define NoEqu(x,y) (x)!=(y)
70 #define IsTrue(x) (x)==(TRUE)
71 #define NoTrue(x) (x)==(FALSE)
77 static void atrrib_get();
78 static void attrib_get();
81 typedef struct Attribute
89 static void attrib_get()
94 static void attrib_set()
100 #endif // END OF COO_H;