1 #ifndef UNIT_CATEGORY_H
2 #define UNIT_CATEGORY_H
4 #include <glib-object.h>
10 #define UNIT_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), unit_category_get_type(), UnitCategory))
12 typedef struct UnitCategoryPrivate UnitCategoryPrivate
;
16 GObject parent_instance
;
17 UnitCategoryPrivate
*priv
;
22 GObjectClass parent_class
;
25 GType
unit_category_get_type(void);
27 UnitCategory
*unit_category_new(const gchar
*name
, const gchar
*display_name
);
29 const gchar
*unit_category_get_name(UnitCategory
*category
);
31 const gchar
*unit_category_get_display_name(UnitCategory
*category
);
33 Unit
*unit_category_get_unit_by_name(UnitCategory
*category
, const gchar
*name
);
35 Unit
*unit_category_get_unit_by_symbol(UnitCategory
*category
, const gchar
*symbol
);
37 void unit_category_add_unit(UnitCategory
*category
, Unit
*unit
);
39 const GList
*unit_category_get_units(UnitCategory
*category
);
41 gboolean
unit_category_convert(UnitCategory
*category
, const MPNumber
*x
, Unit
*x_units
, Unit
*z_units
, MPNumber
*z
);
45 #endif /* UNIT_CATEGORY_H */