From 1f325b12c1a68f3d0b6fafb90e8fa88b17fd5216 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Fri, 16 Oct 2009 14:52:06 +0200 Subject: [PATCH] [AdgModel] Changed API to adg_model_named_pair() Renamed adg_model_get_named_pair() to adg_model_named_pair(). I really need to provide a document somewhere introducing the convention I'm following in naming the APIs. --- adg/adg-model.c | 12 ++++++------ adg/adg-model.h | 4 ++-- adg/adg-point.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/adg/adg-model.c b/adg/adg-model.c index fa503ace..c69ca9ee 100644 --- a/adg/adg-model.c +++ b/adg/adg-model.c @@ -73,7 +73,7 @@ static void add_dependency (AdgModel *model, static void remove_dependency (AdgModel *model, AdgEntity *entity); static const AdgPair * - get_named_pair (AdgModel *model, + named_pair (AdgModel *model, const gchar *name); static void set_named_pair (AdgModel *model, const gchar *name, @@ -101,7 +101,7 @@ adg_model_class_init(AdgModelClass *klass) klass->add_dependency = add_dependency; klass->remove_dependency = remove_dependency; - klass->get_named_pair = get_named_pair; + klass->named_pair = named_pair; klass->set_named_pair = set_named_pair; klass->clear = NULL; klass->changed = changed; @@ -372,7 +372,7 @@ adg_model_set_named_pair(AdgModel *model, const gchar *name, } /** - * adg_model_get_named_pair: + * adg_model_named_pair: * @model: an #AdgModel * @name: the name of the pair to get * @@ -382,12 +382,12 @@ adg_model_set_named_pair(AdgModel *model, const gchar *name, * Returns: the requested #AdgPair or %NULL if not found **/ const AdgPair * -adg_model_get_named_pair(AdgModel *model, const gchar *name) +adg_model_named_pair(AdgModel *model, const gchar *name) { g_return_val_if_fail(ADG_IS_MODEL(model), NULL); g_return_val_if_fail(name != NULL, NULL); - return ADG_MODEL_GET_CLASS(model)->get_named_pair(model, name); + return ADG_MODEL_GET_CLASS(model)->named_pair(model, name); } /** @@ -491,7 +491,7 @@ set_named_pair(AdgModel *model, const gchar *name, const AdgPair *pair) } static const AdgPair * -get_named_pair(AdgModel *model, const gchar *name) +named_pair(AdgModel *model, const gchar *name) { AdgModelPrivate *data = model->data; diff --git a/adg/adg-model.h b/adg/adg-model.h index 63977ee7..3f766911 100644 --- a/adg/adg-model.h +++ b/adg/adg-model.h @@ -51,7 +51,7 @@ struct _AdgModelClass { AdgEntity *entity); void (*remove_dependency) (AdgModel *model, AdgEntity *entity); - const AdgPair * (*get_named_pair) (AdgModel *model, + const AdgPair * (*named_pair) (AdgModel *model, const gchar *name); void (*set_named_pair) (AdgModel *model, const gchar *name, @@ -74,7 +74,7 @@ void adg_model_foreach_dependency (AdgModel *model, void adg_model_set_named_pair (AdgModel *model, const gchar *name, const AdgPair *pair); -const AdgPair * adg_model_get_named_pair (AdgModel *model, +const AdgPair * adg_model_named_pair (AdgModel *model, const gchar *name); void adg_model_clear (AdgModel *model); void adg_model_changed (AdgModel *model); diff --git a/adg/adg-point.c b/adg/adg-point.c index 9901cfde..d78baba7 100644 --- a/adg/adg-point.c +++ b/adg/adg-point.c @@ -248,7 +248,7 @@ adg_point_set_from_model(AdgPoint *point, AdgModel *model, const gchar *name) * Updates the pair of @point. If @point is an explicit pair (either * if set with adg_point_set() or adg_point_set_explicit()), no action * is taken. If @point is linked to a named pair, instead, the internal - * pair is updated with the value returned by adg_model_get_named_pair(). + * pair is updated with the value returned by adg_model_named_pair(). **/ void adg_point_update(AdgPoint *point) @@ -261,7 +261,7 @@ adg_point_update(AdgPoint *point) if (point->model == NULL) return; - pair = adg_model_get_named_pair(point->model, point->name); + pair = adg_model_named_pair(point->model, point->name); if (pair == NULL) { g_warning("%s: `%s' named pair not found in `%s' model instance", G_STRLOC, point->name, -- 2.11.4.GIT