PGPSLocation.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2018 Digital Barriers plc. All rights reserved.
3  * Contact: http://www.digitalbarriers.com/
4  *
5  * This file is part of the Papillon SDK.
6  *
7  * You can't use, modify or distribute any part of this file without
8  * the explicit written agreements of Digital Barriers.
9  */
10 
15 #pragma once
16 #include <PMath.h>
17 #include <PObject.h>
18 
19 PAPILLON_BEGIN_NAMESPACE
20 
26 class PAPILLON_API_CORE PGPSLocation : public PObject
27 {
28 public:
32  static const PGPSLocation& Bad() { static const PGPSLocation BAD(PMath::NaNd(), PMath::NaNd()); return BAD; }
33 
39  explicit PGPSLocation(double longitude = 0.0, double latitude = 0.0);
40 
44  PGPSLocation(const PGPSLocation& other);
45 
49  virtual ~PGPSLocation();
50 
54  PGPSLocation& operator=(const PGPSLocation& other);
55 
59  bool operator==(const PGPSLocation& other) const;
60 
64  double GetLongitude() const;
65 
69  double GetLatitude() const;
70 
74  bool IsValid() const;
75 };
76 
77 PAPILLON_END_NAMESPACE
78 
The PGPSLocation class represents a GPS location; PGPSLocation instances are immutable (thread-safe)...
Definition: PGPSLocation.h:26
The PObject class is the root class of all Papillon classes; all PObject behaves like shared referenc...
Definition: PObject.h:27
static double NaNd()
Returns NaN (Not a Number) value for double numbers.
Definition: PMath.h:46
Math toolbox.
Class PObject: the root class of all Papillon classes.
PObject & operator=(const PObject &obj)
Performs a shared copy of other to this object.
Definition: PObject.h:45
static const PGPSLocation & Bad()
Returns the constant holding the bad instance of a PGPSLocation.
Definition: PGPSLocation.h:32