Commit c4b79695 authored by Martin Kröning's avatar Martin Kröning 🦀
Browse files

Use C style comments in C headers

parent dbe83da2
...@@ -7,47 +7,61 @@ ...@@ -7,47 +7,61 @@
extern "C" { extern "C" {
#endif #endif
/// The application to show a map, a list of vehicles and additional information /**
* The application to show a map, a list of vehicles and additional information
*/
struct MapApp; struct MapApp;
/// Creates a MapApp and opens the corresponding window. /**
/// * Creates a MapApp and opens the corresponding window.
/// You *have* to call mapAppDestroy(MapApp *) to avoid memory leaks. *
/// * You *have* to call mapAppDestroy(MapApp *) to avoid memory leaks.
/// \returns A pointer to the created MapApp *
* \returns A pointer to the created MapApp
*/
MapApp *mapAppCreate(const char *windowTitle); MapApp *mapAppCreate(const char *windowTitle);
/// Destroys \p mapApp and frees its memory. /**
* Destroys \p mapApp and frees its memory.
*/
void mapAppDestroy(MapApp *mapApp); void mapAppDestroy(MapApp *mapApp);
/// Adds a junction to \p 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. * 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); void mapAppAddJunction(MapApp *mapApp, double x, double y);
/// Adds a road to \p mapApp /**
/// * 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 coordinates A pointer to the begin of an array of the coordinates
/// \param coordinateCount The count of \p 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, void mapAppAddRoad(MapApp *mapApp, const char *laneThereName,
const char *laneBackName, const double *coordinates, const char *laneBackName, const double *coordinates,
size_t coordinateCount); size_t coordinateCount);
/// Adds or replaces a vehicle to/in \p mapApp /**
/// * 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. * 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. * \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, void mapAppAddOrReplaceVehicle(MapApp *mapApp, const char *vehicleName,
const char *roadName, double positionOnLane, const char *roadName, double positionOnLane,
double speed, double remainingFuel, double red, double speed, double remainingFuel, double red,
double green, double blue); double green, double blue);
/// Sets the duration label of \p mapApp to \p minutes /**
* Sets the duration label of \p mapApp to \p minutes
*/
void mapAppSetDurationLabel(MapApp *mapApp, int64_t minutes); void mapAppSetDurationLabel(MapApp *mapApp, int64_t minutes);
#ifdef __cplusplus #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