summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvglasow <mvglasow@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-11-08 15:40:55 +0000
committermvglasow <mvglasow@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-11-08 15:40:55 +0000
commit6a7ded2e0ccc206042fc03bf3f99eb3f7e8cd66a (patch)
tree5524d24024748a8ef676bd63b92b46d6142d4f4c
parent3d3139b5b858cc27a9461de24b23e2cefb0179ea (diff)
downloadnavit-6a7ded2e0ccc206042fc03bf3f99eb3f7e8cd66a.tar.gz
Refactoring:core:Add doxygen comments
Signed-off-by: mvglasow <michael -at- vonglasow.com> git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5930 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit/attr.c9
-rw-r--r--navit/item.c21
-rw-r--r--navit/route.c2
3 files changed, 31 insertions, 1 deletions
diff --git a/navit/attr.c b/navit/attr.c
index 903bcc8f1..1c13c3fbf 100644
--- a/navit/attr.c
+++ b/navit/attr.c
@@ -401,6 +401,15 @@ attr_to_text_ext(struct attr *attr, char *sep, enum attr_format fmt, enum attr_f
return g_strdup_printf("(no text[%s])", attr_to_name(type));
}
+/**
+ * @brief Converts an attribute to a string that can be displayed
+ *
+ * This function is just a wrapper around {@code attr_to_text_ext()}.
+ *
+ * @param attr The attribute to convert
+ * @param map
+ * @param pretty Not used
+ */
char *
attr_to_text(struct attr *attr, struct map *map, int pretty)
{
diff --git a/navit/item.c b/navit/item.c
index 4150dc03e..6e72c5a0f 100644
--- a/navit/item.c
+++ b/navit/item.c
@@ -130,12 +130,33 @@ item_cleanup(void)
g_hash_table_destroy(default_flags_hash);
}
+/**
+ * @brief Resets the "coordinate pointer" of an item
+ *
+ * This function resets the "coordinate pointer" of an item to point to the first coordinate pair,
+ * so that at the next call to {@code item_coord_get()} the first coordinates will be returned.
+ */
void
item_coord_rewind(struct item *it)
{
it->meth->item_coord_rewind(it->priv_data);
}
+/**
+ * @brief Gets the next coordinates from an item
+ *
+ * This function returns a list of coordinates from an item and advances the "coordinate pointer"
+ * by the number of coordinates returned, so that at the next call the next coordinates will be returned.
+ *
+ * @param it The item
+ * @param c Points to a buffer that will receive the coordinates.
+ * The buffer must be at least {@code count * sizeof(struct coord)} bytes in size.
+ * @param count The number of coordinates to retrieve. Attempts to read past the
+ * end are handled gracefully and only the available number of coordinates is
+ * returned.
+ *
+ * @return The number of coordinates actually retrieved and stored in {@code c}
+ */
int
item_coord_get(struct item *it, struct coord *c, int count)
{
diff --git a/navit/route.c b/navit/route.c
index cf9aff80e..825f26f34 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -2135,7 +2135,7 @@ route_process_traffic_distortion(struct route_graph *this, struct item *item)
}
/**
- * @brief Adds a route distortion item to the route graph
+ * @brief Adds a turn restriction item to the route graph
*
* @param this The route graph to add to
* @param item The item to add