Commit 1503e93b authored by Martin Kröning's avatar Martin Kröning

Add documentation to the MapAppABI header

parent e76f71b8
......@@ -7,17 +7,47 @@
extern "C" {
#endif
/// The application to show a map, a list of vehicles and additional information
struct MapApp;
/// Creates a MapApp and opens the corresponding window.
///
/// You *have* to call mapAppDestroy(MapApp *) to avoid memory leaks.
///
/// \returns A pointer to the created MapApp
MapApp *mapAppCreate();
/// Destroys \p mapApp and frees its memory.
void mapAppDestroy(MapApp *mapApp);
/// Adds a junction to \p mapApp
///
/// The coordinates \p x and \p y mark the middle of the junction
/// and represent amounts of pixels.
void mapAppAddJunction(MapApp *mapApp, double x, double y);
/// Adds a road to \p mapApp
///
/// \param coordinates A pointer to the begin of an array of the coordinates
/// The coordinates have to be alternating values of x and y in pixels.
/// \param coordinateCount The count of \p coordinates
void mapAppAddRoad(MapApp *mapApp, const char *laneThereName,
const char *laneBackName, const double *coordinates,
size_t coordinateCount);
/// Adds or replaces a vehicle to/in \p mapApp
///
/// The parameters \p red \p green and \p blue are the RGB components of the
/// color representing the vehicle. They have to be between 0 and 1.
///
/// \param positionOnLane The relative position of the vehicle on its lane
/// has to be between 0 and 1.
void mapAppAddOrReplaceVehicle(MapApp *mapApp, const char *vehicleName,
const char *roadName, double positionOnLane,
double speed, double remainingFuel, double red,
double green, double blue);
/// Sets the duration label of \p mapApp to \p minutes
void mapAppSetDurationLabel(MapApp *mapApp, int64_t minutes);
#ifdef __cplusplus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment