GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
MeasurementBaseUnit.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-present Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 #ifndef GDCORE_MEASUREMENTBASEUNIT
7 #define GDCORE_MEASUREMENTBASEUNIT
8 #include <vector>
9 
10 #include "GDCore/String.h"
11 namespace gd {
12 class SerializerElement;
13 }
14 
15 namespace gd {
16 
20 class GD_CORE_API MeasurementBaseUnit {
21 public:
23  gd::String quantity_)
24  : name(name_), symbol(symbol_), quantity(quantity_) {}
25 
26  virtual ~MeasurementBaseUnit();
27 
31  const gd::String &GetName() const { return name; }
32 
36  const gd::String &GetSymbol() const { return symbol; }
37 
41  const gd::String &GetQuantity() const { return quantity; }
42 
43  static const gd::MeasurementBaseUnit degreeAngle;
44  static const gd::MeasurementBaseUnit pixel;
45  static const gd::MeasurementBaseUnit meter;
46  static const gd::MeasurementBaseUnit second;
47  static const gd::MeasurementBaseUnit kilogram;
48 
49 private:
50  gd::String name;
51  gd::String symbol;
52  gd::String quantity;
53 };
54 
55 } // namespace gd
56 
57 #endif // GDCORE_MEASUREMENTBASEUNIT
An atomic unit of measurement.
Definition: MeasurementBaseUnit.h:20
const gd::String & GetName() const
Return the unit name.
Definition: MeasurementBaseUnit.h:31
const gd::String & GetSymbol() const
Return the unit symbol.
Definition: MeasurementBaseUnit.h:36
const gd::String & GetQuantity() const
Return the physical quantity.
Definition: MeasurementBaseUnit.h:41
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24