Add a unit-manager object to track units
[gcalctool.git] / src / math-variables.h
blob82df2aa7ae381b1ebf2103f27fd228d9bf2681d3
1 /* Copyright (c) 2008-2009 Robert Ancell
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2, or (at your option)
6 * any later version.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
16 * 02111-1307, USA.
19 #ifndef MATH_VARIABLES_H
20 #define MATH_VARIABLES_H
22 #include <glib-object.h>
23 #include "mp.h"
25 G_BEGIN_DECLS
27 #define MATH_VARIABLES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), math_equation_get_type(), MathVariables))
29 typedef struct MathVariablesPrivate MathVariablesPrivate;
31 typedef struct
33 GObject parent_instance;
34 MathVariablesPrivate *priv;
35 } MathVariables;
37 typedef struct
39 GObjectClass parent_class;
40 } MathVariablesClass;
42 GType math_variables_get_type(void);
44 MathVariables *math_variables_new(void);
46 gchar **math_variables_get_names(MathVariables *variables);
48 void math_variables_set(MathVariables *variables, const char *name, const MPNumber *value);
50 MPNumber *math_variables_get(MathVariables *variables, const char *name);
52 void math_variables_delete(MathVariables *variables, const char *name);
54 G_END_DECLS
56 #endif /* MATH_VARIABLES_H */