All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ShapeCreateParamsBuilderBase.h
1 #pragma once
2 
3 #include "EegeoShapes.h"
4 #include "Types.h"
5 #include "LatLongAltitude.h"
6 #include "PositioningTypes.h"
7 #include "Colors.h"
8 #include <string>
9 
10 
11 namespace Eegeo
12 {
13  namespace Shapes
14  {
15  template <typename TBuilder, typename TShapeCreateParams>
17  {
18  public:
19  typedef TBuilder BuilderType;
20  typedef TShapeCreateParams ShapeCreateParamsType;
21 
23  : m_elevationMode(Eegeo::Positioning::ElevationMode::HeightAboveGround)
24  , m_elevation(0.0)
25  , m_indoorMapFloorId(0)
26  {
27 
28  }
29 
30  BuilderType& SetElevationMode(Eegeo::Positioning::ElevationMode::Type elevationMode)
31  {
32  m_elevationMode = elevationMode;
33  return *static_cast<BuilderType*>(this);
34  }
35 
36  BuilderType& SetElevation(double elevation)
37  {
38  m_elevation = elevation;
39  return *static_cast<BuilderType*>(this);
40  }
41 
42  BuilderType& SetIndoorMap(const std::string& indoorMapId, int indoorMapFloorId)
43  {
44  m_indoorMapId = indoorMapId;
45  m_indoorMapFloorId = indoorMapFloorId;
46  return *static_cast<BuilderType*>(this);
47  }
48 
49  protected:
50  Eegeo::Positioning::ElevationMode::Type m_elevationMode;
51  double m_elevation;
52  std::string m_indoorMapId;
53  int m_indoorMapFloorId;
54  };
55  }
56 }