GeoPoint3D.h 1.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#pragma once

#include "ros_bridge/include/messages.h"
#include "ROSMessageType.h"
#include "ROSMessageGroups.h"

#include <QObject>
typedef ROSMessageType<QString> ROSMsg;
typedef ros_bridge::GeoPoint::GeoPoint ROSGeoPoint;
class GeoPoint3D : public QObject, public ROSMsg, public ROSGeoPoint
{
    Q_OBJECT
public:
    typedef GeoPointGroup Group;

    explicit GeoPoint3D(QObject *parent = nullptr)
        : QObject(parent), ROSMsg(), ROSGeoPoint() {}
    explicit GeoPoint3D(double latitude,
                        double longitude,
                        double altitude,
                        QObject *parent = nullptr)
        : QObject(parent), ROSMsg(), ROSGeoPoint(latitude, longitude, altitude)
    {}
    explicit GeoPoint3D(const GeoPoint3D& p,
                        QObject *parent = nullptr)
        : QObject(parent), ROSMsg(), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
    {}
    explicit GeoPoint3D(const class ros_bridge::GeoPoint::GeoPoint& p,
                        QObject *parent = nullptr)
        : QObject(parent), ROSMsg(), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
    {}

    virtual GeoPoint3D *Clone() const override;
    GeoPoint3D &operator=(const GeoPoint3D&p);

};