File indexing completed on 2024-12-01 12:24:55

0001 /*
0002     SPDX-FileCopyrightText: 2007 James B. Bowlin <bowlin@mindspring.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 /* It is a bit cheesy/crappy to have somewhat unrelated typedefs gathered in a
0008  * single typedef.h file like this but it has been incredibly useful For
0009  * example, I could convert the list structures below from QList to QVector by
0010  * simply making a single change in this file.  Also, typedefs can take people
0011  * by surprise so by putting most of them all in one place I hope to remove
0012  * some of the surprise.
0013  *
0014  * -- James B. Bowlin
0015  *
0016  * We may transition to the use of smart pointers whereever possible. Gathering
0017  * syntactic sugar here, takes the pain of it away.
0018  *
0019  * Conventions:
0020  *  - [x]_ptr<Type> => Type_[first letter of `x`]
0021  *    for example: typedef std::shared_ptr<SkyObject> SkyObject_s;
0022  *
0023  * -- Valentin Boettcher
0024  */
0025 
0026 #pragma once
0027 
0028 #include <qglobal.h>
0029 #include <QHash>
0030 #include <QVector>
0031 
0032 #include <memory>
0033 
0034 class SkyPoint;
0035 class LineList;
0036 class StarObject;
0037 class StarBlock;
0038 class SkyObject;
0039 class KSPlanetBase;
0040 class GeoLocation;
0041 class EclipseEvent;
0042 
0043 typedef quint32 DrawID;
0044 typedef quint32 UpdateID;
0045 typedef qint32 Trixel;
0046 typedef unsigned short BufNum;
0047 
0048 typedef QVector<std::shared_ptr<SkyPoint>> SkyList;
0049 typedef QHash<Trixel, bool> IndexHash;
0050 typedef QHash<Trixel, bool> SkyRegion;
0051 typedef QList<StarObject *> StarList;
0052 typedef QVector<StarList *> StarIndex;
0053 typedef QVector<std::shared_ptr<LineList>> LineListList;
0054 typedef QHash<Trixel, std::shared_ptr<LineListList>> LineListHash;
0055 typedef QList<SkyObject *> SkyObjectList;
0056 
0057 typedef std::shared_ptr<SkyObject> SkyObject_s;
0058 typedef std::shared_ptr<KSPlanetBase> KSPlanetBase_s;
0059 typedef std::shared_ptr<EclipseEvent> EclipseEvent_s;