diff options
author | mvglasow <michael -at- vonglasow.com> | 2020-08-07 22:35:57 +0200 |
---|---|---|
committer | mvglasow <michael -at- vonglasow.com> | 2020-08-07 22:37:09 +0200 |
commit | 4a14ba5320f3d13abdb29d7b4402bb4af1635a49 (patch) | |
tree | 13334437ef40470ffaaad597a13be0713017072b /navit/route.c | |
parent | b942644f19e06a92e955c59206937ae5d541f1d0 (diff) | |
download | navit-4a14ba5320f3d13abdb29d7b4402bb4af1635a49.tar.gz |
Refactor:core:Add documentation
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/route.c')
-rw-r--r-- | navit/route.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/navit/route.c b/navit/route.c index 652ae6d54..e0358db66 100644 --- a/navit/route.c +++ b/navit/route.c @@ -1129,6 +1129,20 @@ void route_set_destinations(struct route *this, struct pcoord *dst, int count, i profile(0,"end"); } +/** + * @brief Retrieves destinations from the route + * + * Prior to calling this method, you may want to retrieve the number of destinations by calling + * {@link route_get_destination_count(struct route *)} and assigning a buffer of sufficient capacity. + * + * If the return value equals `count`, the buffer was either just large enough or too small to hold the + * entire list of destinations; there is no way to tell from the result which is the case. + * + * @param this The route instance + * @param pc Pointer to an array of projected coordinates which will receive the destination coordinates + * @param count Capacity of `pc` + * @return The number of destinations stored in `pc`, never greater than `count` + */ int route_get_destinations(struct route *this, struct pcoord *pc, int count) { int ret=0; GList *l=this->destinations; |