src/simple_constraint.h

00001 /* 
00002  * Copyright (C) 2005 Jukka Zitting <jz@yukatan.fi>
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 #ifndef _SIMPLE_CONSTRAINT_H
00019 #define _SIMPLE_CONSTRAINT_H
00020 
00021 #include <glib.h>
00022 #include <glib-object.h>
00023 #include "query_constraint.h"
00024 #include "midgard/midgard_defs.h"
00025 #include "midgard/types.h"
00026 
00027 #define MIDGARD_TYPE_SIMPLE_CONSTRAINT            (midgard_simple_constraint_get_type())
00028 #define MIDGARD_SIMPLE_CONSTRAINT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), MIDGARD_TYPE_SIMPLE_CONSTRAINT, MidgardSimpleConstraint))
00029 #define MIDGARD_SIMPLE_CONSTRAINT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), MIDGARD_TYPE_SIMPLE_CONSTRAINT, MidgardSimpleConstraintClass))
00030 #define MIDGARD_IS_SIMPLE_CONSTRAINT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), MIDGARD_TYPE_SIMPLE_CONSTRAINT))
00031 #define MIDGARD_IS_SIMPLE_CONSTRAINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MIDGARD_TYPE_SIMPLE_CONSTRAINT))
00032 #define MIDGARD_SIMPLE_CONSTRAINT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), MIDGARD_TYPE_SIMPLE_CONSTRAINT, MidgardSimpleConstraintClass))
00033 
00034 typedef struct {
00035         MidgardQueryConstraint parent;
00036 
00037         /* private fields */
00038         const midgard *mgd;
00039         const GParamSpec *spec;
00040         const gchar *op;
00041         GValue *value;
00042         GObjectClass *klass;
00043         GObjectClass *initial_klass;
00044         GType ext_type;
00045         GType parent_type;
00046         /* Initial klass initizlized with QB must be known all the time */
00047         GList *types;
00048 } MidgardSimpleConstraint;
00049 
00050 typedef struct {
00051         MidgardQueryConstraintClass parent;
00052 } MidgardSimpleConstraintClass;
00053 
00054 extern GType midgard_simple_constraint_get_type(void);
00055 
00056 extern MidgardSimpleConstraint *midgard_simple_constraint_new(
00057         midgard *mgd, GObjectClass *klass,
00058         const gchar *name, const gchar *op, const GValue *value);
00059 
00060 #endif

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