midgard/midgard_reflection_class.h

00001 /* 
00002  * Copyright (C) 2006 Piotr Pokora <piotr.pokora@infoglob.pl>
00003  *
00004  * This program is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License as published
00006  * by the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  * 
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 #ifndef MIDGARD_REFLECTION_CLASS_H
00020 #define MIDGARD_REFLECTION_CLASS_H
00021 
00036 #include "midgard/midgard_type.h"
00037 #include "midgard/types.h"
00038 
00039 /* MidgardReflectionClass */
00040 
00041 /* convention macros */
00042 #define MIDGARD_TYPE_REFLECTION_CLASS (midgard_reflection_class_get_type())
00043 #define MIDGARD_REFLECTION_CLASS(object)  \
00044         (G_TYPE_CHECK_INSTANCE_CAST ((object),MIDGARD_TYPE_REFLECTION_CLASS, midgard))
00045 #define MIDGARD_REFLECTION_CLASS_CLASS(klass)  \
00046         (G_TYPE_CHECK_CLASS_CAST ((klass), MIDGARD_TYPE_REFLECTION_CLASS, MidgardReflectionClassClass))
00047 #define MIDGARD_IS_REFLECTION_CLASS(object)   \
00048         (G_TYPE_CHECK_INSTANCE_TYPE ((object), MIDGARD_TYPE_REFLECTION_CLASS))
00049 #define MIDGARD_IS_REFLECTION_CLASS_CLASS(klass) \
00050         (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDGARD_TYPE_REFLECTION_CLASS))
00051 #define MIDGARD_REFLECTION_CLASS_GET_CLASS(obj) \
00052         (G_TYPE_INSTANCE_GET_CLASS ((object), MIDGARD_TYPE_REFLECTION_CLASS, MidgardReflectionClassClass))
00053 
00054 typedef struct MidgardReflectionClass MidgardReflectionClass;
00055 typedef struct MidgardReflectionClassClass MidgardReflectionClassClass;
00056 
00063 struct MidgardReflectionClassClass{
00064         GObjectClass parent;
00065 
00066         /* public class members */
00067         void (*is_multilang) (MidgardReflectionClass *object);
00068         void (*parent) (MidgardReflectionClass *object);
00069         void (*children) (MidgardReflectionClass *object);
00070         void (*get_primary_property) (MidgardReflectionClass *object);
00071         void (*get_parent_property) (MidgardReflectionClass *object);
00072         void (*get_up_property) (MidgardReflectionClass *object);
00073 };
00074 
00082 struct MidgardReflectionClass{
00083         GObject parent;
00084 };
00085 
00093 extern GType midgard_reflection_class_get_type(void);
00094 
00112 extern MidgardReflectionClass *midgard_reflection_class_new(
00113                 MidgardObjectClass *klass);
00114 
00126 extern gboolean midgard_reflection_class_is_multilang(
00127                 MidgardReflectionClass *object);
00128 
00142 extern MidgardObjectClass *midgard_reflection_class_parent(
00143                 MidgardReflectionClass *object);
00144 
00159 extern GList *midgard_reflection_class_children(
00160                 MidgardReflectionClass *object);
00161 
00181 extern GParamSpec *midgard_reflection_class_get_primary_property(
00182                 MidgardReflectionClass *object);
00183 
00184 
00202 extern GParamSpec *midgard_reflection_class_get_parent_property(
00203                 MidgardReflectionClass *object);
00204 
00205 
00223 extern GParamSpec *midgard_reflection_class_get_up_property(
00224                 MidgardReflectionClass *object);
00225 
00226 #endif /* MIDGARD_REFLECTION_CLASS_H */

Generated on Thu Feb 22 06:15:14 2007 for midgard-core by  doxygen 1.4.6