subsurface/core/triptable.h
Berthold Stoeger 7792f54a73 core: move functions into trip-structure
Not strictly necessary, but a "natural" thing to do in a classical
C++ code base.

Move the tiny trip-table into its own source file, since it also
has its own header.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-08-13 19:28:30 +02:00

25 lines
560 B
C

// SPDX-License-Identifier: GPL-2.0
#ifndef TRIPTABLE_H
#define TRIPTABLE_H
#include "owning_table.h"
struct dive_trip;
int comp_trips(const dive_trip &t1, const dive_trip &t2);
struct trip_table : public sorted_owning_table<dive_trip, &comp_trips> {
dive_trip *get_by_uniq_id(int tripId) const;
};
#ifdef DEBUG_TRIP
extern void dump_trip_list();
#endif
/* Make pointers to trip_table "Qt metatypes" so that they can be
* passed through QVariants and through QML. See comment in dive.h. */
#include <QObject>
Q_DECLARE_METATYPE(trip_table *);
#endif