libosmscout  1.1.1
TypeFeatures.h
Go to the documentation of this file.
1 #ifndef OSMSCOUT_FEATURES_H
2 #define OSMSCOUT_FEATURES_H
3 
4 /*
5  This source is part of the libosmscout library
6  Copyright (C) 2014 Tim Teulings
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2.1 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22 
23 #include <cstdint>
24 #include <limits>
25 #include <unordered_map>
26 
27 #include <osmscout/TypeConfig.h>
28 #include <osmscout/TypeFeature.h>
29 
30 #include <osmscout/util/Color.h>
31 
32 namespace osmscout {
33 
35  {
36  private:
37  std::string name;
38 
39  public:
40  NameFeatureValue() = default;
41  NameFeatureValue(const NameFeatureValue& featureValue) = default;
42 
43  explicit NameFeatureValue(const std::string& name)
44  : name(name)
45  {
46  // no code
47  }
48 
49  void SetName(const std::string& name)
50  {
51  this->name=name;
52  }
53 
54  std::string GetName() const
55  {
56  return name;
57  }
58 
59  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
60  {
61  return name;
62  }
63 
64  void Read(FileScanner& scanner) override;
65  void Write(FileWriter& writer) override;
66 
67  NameFeatureValue& operator=(const FeatureValue& other) override;
68  bool operator==(const FeatureValue& other) const override;
69  };
70 
72  {
73  public:
75  static const char* const NAME;
76 
78  static const char* const NAME_LABEL;
79 
81  static const size_t NAME_LABEL_INDEX;
82 
83  public:
84  NameFeature();
85  void Initialize(TagRegistry& tagRegistry) override;
86 
87  std::string GetName() const override;
88 
89  size_t GetValueAlignment() const override;
90  size_t GetValueSize() const override;
91  FeatureValue* AllocateValue(void* buffer) override;
92 
93  void Parse(TagErrorReporter& reporter,
94  const TagRegistry& tagRegistry,
95  const FeatureInstance& feature,
96  const ObjectOSMRef& object,
97  const TagMap& tags,
98  FeatureValueBuffer& buffer) const override;
99  };
100 
102  {
103  private:
104  std::string nameAlt;
105 
106  public:
107  NameAltFeatureValue() = default;
108  NameAltFeatureValue(const NameAltFeatureValue& featureValue) = default;
109 
110  explicit NameAltFeatureValue(const std::string& nameAlt)
111  : nameAlt(nameAlt)
112  {
113  // no code
114  }
115 
116  void SetNameAlt(const std::string& nameAlt)
117  {
118  this->nameAlt=nameAlt;
119  }
120 
121  std::string GetNameAlt() const
122  {
123  return nameAlt;
124  }
125 
126  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
127  {
128  return nameAlt;
129  }
130 
131  void Read(FileScanner& scanner) override;
132  void Write(FileWriter& writer) override;
133 
134  NameAltFeatureValue& operator=(const FeatureValue& other) override;
135  bool operator==(const FeatureValue& other) const override;
136  };
137 
139  {
140  public:
142  static const char* const NAME;
143 
145  static const char* const NAME_LABEL;
146 
148  static const size_t NAME_LABEL_INDEX;
149 
150  public:
151  NameAltFeature();
152  void Initialize(TagRegistry& tagRegistry) override;
153 
154  std::string GetName() const override;
155 
156  size_t GetValueAlignment() const override;
157  size_t GetValueSize() const override;
158  FeatureValue* AllocateValue(void* buffer) override;
159 
160  void Parse(TagErrorReporter& reporter,
161  const TagRegistry& tagRegistry,
162  const FeatureInstance& feature,
163  const ObjectOSMRef& object,
164  const TagMap& tags,
165  FeatureValueBuffer& buffer) const override;
166  };
167 
169  {
170  private:
171  std::string nameShort;
172 
173  public:
174  NameShortFeatureValue() = default;
175 
176  explicit NameShortFeatureValue(const std::string& nameShort)
177  : nameShort(nameShort)
178  {
179  // no code
180  }
181 
182  void SetNameShort(const std::string& nameShort)
183  {
184  this->nameShort=nameShort;
185  }
186 
187  std::string GetNameShort() const
188  {
189  return nameShort;
190  }
191 
192  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
193  {
194  return nameShort;
195  }
196 
197  void Read(FileScanner& scanner) override;
198  void Write(FileWriter& writer) override;
199 
200  NameShortFeatureValue& operator=(const FeatureValue& other) override;
201  bool operator==(const FeatureValue& other) const override;
202  };
203 
205  {
206  private:
207  TagId tagShortName;
208 
209  public:
211  static const char* const NAME;
212 
214  static const char* const NAME_LABEL;
215 
217  static const size_t NAME_LABEL_INDEX;
218 
219  public:
221  void Initialize(TagRegistry& tagRegistry) override;
222 
223  std::string GetName() const override;
224 
225  size_t GetValueAlignment() const override;
226  size_t GetValueSize() const override;
227  FeatureValue* AllocateValue(void* buffer) override;
228 
229  void Parse(TagErrorReporter& reporter,
230  const TagRegistry& tagRegistry,
231  const FeatureInstance& feature,
232  const ObjectOSMRef& object,
233  const TagMap& tags,
234  FeatureValueBuffer& buffer) const override;
235  };
236 
238  {
239  private:
240  std::string ref;
241 
242  public:
243  RefFeatureValue() = default;
244  RefFeatureValue(const RefFeatureValue& featureValue) = default;
245 
246  explicit RefFeatureValue(const std::string& ref)
247  : ref(ref)
248  {
249  // no code
250  }
251 
252  void SetRef(const std::string& ref)
253  {
254  this->ref=ref;
255  }
256 
257  std::string GetRef() const
258  {
259  return ref;
260  }
261 
262  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
263  {
264  return ref;
265  }
266 
267  void Read(FileScanner& scanner) override;
268  void Write(FileWriter& writer) override;
269 
270  RefFeatureValue& operator=(const FeatureValue& other) override;
271  bool operator==(const FeatureValue& other) const override;
272  };
273 
275  {
276  private:
277  TagId tagRef;
278 
279  public:
281  static const char* const NAME;
283  static const char* const NAME_LABEL;
285  static const size_t NAME_LABEL_INDEX;
286 
287  public:
288  RefFeature();
289  void Initialize(TagRegistry& tagRegistry) override;
290 
291  std::string GetName() const override;
292 
293  size_t GetValueAlignment() const override;
294  size_t GetValueSize() const override;
295  FeatureValue* AllocateValue(void* buffer) override;
296 
297  void Parse(TagErrorReporter& reporter,
298  const TagRegistry& tagRegistry,
299  const FeatureInstance& feature,
300  const ObjectOSMRef& object,
301  const TagMap& tags,
302  FeatureValueBuffer& buffer) const override;
303  };
304 
306  {
307  private:
308  std::string location;
309 
310  public:
311  LocationFeatureValue() = default;
312  LocationFeatureValue(const LocationFeatureValue& featureValue) = default;
313 
314  explicit LocationFeatureValue(const std::string& location)
315  : location(location)
316  {
317  // no code
318  }
319 
320  void SetLocation(const std::string& location)
321  {
322  this->location=location;
323  }
324 
325  std::string GetLocation() const
326  {
327  return location;
328  }
329 
330  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
331  {
332  return location;
333  }
334 
335  void Read(FileScanner& scanner) override;
336  void Write(FileWriter& writer) override;
337 
338  LocationFeatureValue& operator=(const FeatureValue& other) override;
339  bool operator==(const FeatureValue& other) const override;
340  };
341 
349  {
350  private:
351  TagId tagAddrStreet;
352  TagId tagAddrHouseNr;
353  TagId tagAddrPlace;
354 
355  public:
357  static const char* const NAME;
358 
359  public:
360  void Initialize(TagRegistry& tagRegistry) override;
361 
362  std::string GetName() const override;
363 
364  size_t GetValueAlignment() const override;
365  size_t GetValueSize() const override;
366  FeatureValue* AllocateValue(void* buffer) override;
367 
368  void Parse(TagErrorReporter& reporter,
369  const TagRegistry& tagRegistry,
370  const FeatureInstance& feature,
371  const ObjectOSMRef& object,
372  const TagMap& tags,
373  FeatureValueBuffer& buffer) const override;
374  };
375 
383  {
384  private:
385  std::string address;
386 
387  public:
388  AddressFeatureValue() = default;
389  AddressFeatureValue(const AddressFeatureValue& featureValue) = default;
390 
391  explicit AddressFeatureValue(const std::string& address)
392  : address(address)
393  {
394  // no code
395  }
396 
397  void SetAddress(const std::string& address)
398  {
399  this->address=address;
400  }
401 
402  std::string GetAddress() const
403  {
404  return address;
405  }
406 
407  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
408  {
409  return address;
410  }
411 
412  void Read(FileScanner& scanner) override;
413  void Write(FileWriter& writer) override;
414 
415  AddressFeatureValue& operator=(const FeatureValue& other) override;
416  bool operator==(const FeatureValue& other) const override;
417  };
418 
420  {
421  private:
422  TagId tagAddrHouseNr;
423  TagId tagAddrStreet;
424  TagId tagAddrPlace;
425 
426  public:
428  static const char* const NAME;
429 
431  static const char* const NAME_LABEL;
432 
434  static const size_t NAME_LABEL_INDEX;
435 
436  public:
437  AddressFeature();
438  void Initialize(TagRegistry& tagRegistry) override;
439 
440  std::string GetName() const override;
441 
442  size_t GetValueAlignment() const override;
443  size_t GetValueSize() const override;
444  FeatureValue* AllocateValue(void* buffer) override;
445 
446  void Parse(TagErrorReporter& reporter,
447  const TagRegistry& tagRegistry,
448  const FeatureInstance& feature,
449  const ObjectOSMRef& object,
450  const TagMap& tags,
451  FeatureValueBuffer& buffer) const override;
452  };
453 
455  {
456  public:
457  enum Access : uint8_t {
458  footForward = 1u << 0u,
459  footBackward = 1u << 1u,
460  bicycleForward = 1u << 2u,
461  bicycleBackward = 1u << 3u,
462  carForward = 1u << 4u,
463  carBackward = 1u << 5u,
464  onewayForward = 1u << 6u,
465  onewayBackward = 1u << 7u
466  };
467 
468  private:
469  uint8_t access=0;
470 
471  public:
472  AccessFeatureValue() = default;
473  AccessFeatureValue(const AccessFeatureValue& other) = default;
474 
475  explicit AccessFeatureValue(uint8_t access)
476  : access(access)
477  {
478  // no code
479  }
480 
481  void SetAccess(uint8_t access)
482  {
483  this->access=access;
484  }
485 
486  uint8_t GetAccess() const
487  {
488  return access;
489  }
490 
491  bool CanRoute() const
492  {
493  return (access & (footForward|footBackward|bicycleForward|bicycleBackward|carForward|carBackward))!=0;
494  }
495 
496  bool CanRoute(Vehicle vehicle) const
497  {
498  switch (vehicle)
499  {
500  case vehicleFoot:
501  return (access & (footForward|footBackward))!=0;
502  case vehicleBicycle:
503  return (access & (bicycleForward|bicycleBackward))!=0;
504  case vehicleCar:
505  return (access & (carForward|carBackward))!=0;
506  }
507 
508  return false;
509  }
510 
511  bool CanRoute(VehicleMask vehicleMask) const
512  {
513  if ((vehicleMask & vehicleFoot)!=0 &&
514  (access & (footForward|footBackward))!=0) {
515  return true;
516  }
517 
518  if ((vehicleMask & vehicleBicycle)!=0 &&
519  (access & (bicycleForward|bicycleBackward))!=0) {
520  return true;
521  }
522 
523  if ((vehicleMask & vehicleCar)!=0 &&
524  (access & (carForward|carBackward))!=0) {
525  return true;
526  }
527 
528  return false;
529  }
530 
531  bool CanRouteForward() const
532  {
533  return (access & (footForward|bicycleForward|carForward))!=0;
534  }
535 
536  bool CanRouteForward(Vehicle vehicle) const
537  {
538  switch (vehicle)
539  {
540  case vehicleFoot:
541  return (access & footForward)!=0;
542  case vehicleBicycle:
543  return (access & bicycleForward)!=0;
544  case vehicleCar:
545  return (access & carForward)!=0;
546  }
547 
548  return false;
549  }
550 
551  bool CanRouteBackward() const
552  {
553  return (access & (footBackward|bicycleBackward|carBackward))!=0;
554  }
555 
556  bool CanRouteBackward(Vehicle vehicle) const
557  {
558  switch (vehicle)
559  {
560  case vehicleFoot:
561  return (access & footBackward)!=0;
562  case vehicleBicycle:
563  return (access & bicycleBackward)!=0;
564  case vehicleCar:
565  return (access & carBackward)!=0;
566  }
567 
568  return false;
569  }
570 
571  bool CanRouteFoot() const
572  {
573  return (access & footForward)!=0 ||
574  (access & footBackward)!=0;
575  }
576 
577  bool CanRouteFootForward() const
578  {
579  return (access & footForward)!=0;
580  }
581 
582  bool CanRouteFootBackward() const
583  {
584  return (access & footBackward)!=0;
585  }
586 
587  bool CanRouteBicycle() const
588  {
589  return (access & bicycleForward)!=0 ||
590  (access & bicycleBackward)!=0;
591  }
592 
594  {
595  return (access & bicycleForward)!=0;
596  }
597 
599  {
600  return (access & bicycleBackward)!=0;
601  }
602 
603  bool CanRouteCar() const
604  {
605  return (access & carForward)!=0 ||
606  (access & carBackward)!=0;
607  }
608 
609  bool CanRouteCarForward() const
610  {
611  return (access & carForward)!=0;
612  }
613 
614  bool CanRouteCarBackward() const
615  {
616  return (access & carBackward)!=0;
617  }
618 
619  bool IsOneway() const
620  {
621  return (access & (onewayForward|onewayBackward))!=0;
622  }
623 
624  bool IsOnewayForward() const
625  {
626  return (access & onewayForward)!=0;
627  }
628 
629  bool IsOnewayBackward() const
630  {
631  return (access & onewayBackward)!=0;
632  }
633 
634  void Read(FileScanner& scanner) override;
635  void Write(FileWriter& writer) override;
636 
637  AccessFeatureValue& operator=(const FeatureValue& other) override;
638  bool operator==(const FeatureValue& other) const override;
639  };
640 
642  {
643  private:
644  TagId tagOneway;
645  TagId tagJunction;
646 
647  TagId tagAccess;
648  TagId tagAccessForward;
649  TagId tagAccessBackward;
650 
651  TagId tagFoot;
652  TagId tagFootForward;
653  TagId tagFootBackward;
654 
655  TagId tagBicycle;
656  TagId tagBicycleForward;
657  TagId tagBicycleBackward;
658 
659  TagId tagMotorVehicle;
660  TagId tagMotorVehicleForward;
661  TagId tagMotorVehicleBackward;
662 
663  TagId tagMotorcar;
664  TagId tagMotorcarForward;
665  TagId tagMotorcarBackward;
666 
667  public:
669  static const char* const NAME;
670 
671  private:
672  void ParseAccessFlag(const std::string& value,
673  uint8_t& access,
674  uint8_t bit) const
675  {
676  access&=~bit;
677 
678  if (!(value=="no")) {
679  access|=bit;
680  }
681  }
682 
683  public:
684  void Initialize(TagRegistry& tagRegistry) override;
685 
686  std::string GetName() const override;
687 
688  size_t GetValueAlignment() const override;
689  size_t GetValueSize() const override;
690  FeatureValue* AllocateValue(void* buffer) override;
691 
692  void Parse(TagErrorReporter& reporter,
693  const TagRegistry& tagRegistry,
694  const FeatureInstance& feature,
695  const ObjectOSMRef& object,
696  const TagMap& tags,
697  FeatureValueBuffer& buffer) const override;
698  };
699 
701  {
702  public:
703  enum Access : uint8_t {
704  foot = 1u << 0u,
705  bicycle = 1u << 1u,
706  car = 1u << 2u,
707  };
708 
709  private:
710  uint8_t access=0;
711 
712  public:
713  AccessRestrictedFeatureValue() = default;
714 
715  explicit AccessRestrictedFeatureValue(uint8_t access)
716  : access(access)
717  {
718  // no code
719  }
720 
721  void SetAccess(uint8_t access)
722  {
723  this->access=access;
724  }
725 
726  uint8_t GetAccess() const
727  {
728  return access;
729  }
730 
731  bool CanAccess() const
732  {
733  return (access & (foot|bicycle|car))!=0;
734  }
735 
736  bool CanAccess(Vehicle vehicle) const
737  {
738  switch (vehicle)
739  {
740  case vehicleFoot:
741  return (access &foot)!=0;
742  case vehicleBicycle:
743  return (access & bicycle)!=0;
744  case vehicleCar:
745  return (access & car)!=0;
746  }
747 
748  return false;
749  }
750 
751  bool CanAccess(VehicleMask vehicleMask) const
752  {
753  if ((vehicleMask & vehicleFoot)!=0 &&
754  (access & foot)!=0) {
755  return true;
756  }
757 
758  if ((vehicleMask & vehicleBicycle)!=0 &&
759  (access & bicycle)!=0) {
760  return true;
761  }
762 
763  return (vehicleMask & vehicleCar)!=0 &&
764  (access & car)!=0;
765  }
766 
767  bool CanAccessFoot() const
768  {
769  return (access & foot)!=0;
770  }
771 
772  bool CanAccessBicycle() const
773  {
774  return (access & bicycle)!=0;
775  }
776 
777  bool CanAccessCar() const
778  {
779  return (access & car)!=0;
780  }
781 
782  void Read(FileScanner& scanner) override;
783  void Write(FileWriter& writer) override;
784 
785  AccessRestrictedFeatureValue& operator=(const FeatureValue& other) override;
786  bool operator==(const FeatureValue& other) const override;
787  };
788 
800  {
801  private:
802  TagId tagAccess;
803  TagId tagFoot;
804  TagId tagBicycle;
805  TagId tagMotorVehicle;
806 
807  public:
809  static const char* const NAME;
810 
811  public:
812  void Initialize(TagRegistry& tagRegistry) override;
813 
814  std::string GetName() const override;
815 
816  size_t GetValueAlignment() const override;
817  size_t GetValueSize() const override;
818  FeatureValue* AllocateValue(void* buffer) override;
819 
820  void Parse(TagErrorReporter& reporter,
821  const TagRegistry& tagRegistry,
822  const FeatureInstance& feature,
823  const ObjectOSMRef& object,
824  const TagMap& tags,
825  FeatureValueBuffer& buffer) const override;
826  };
827 
829  {
830  private:
831  int8_t layer=0;
832 
833  public:
834  LayerFeatureValue() = default;
835 
836  explicit LayerFeatureValue(int8_t layer)
837  : layer(layer)
838  {
839  // no code
840  }
841 
842  void SetLayer(int8_t layer)
843  {
844  this->layer=layer;
845  }
846 
847  int8_t GetLayer() const
848  {
849  return layer;
850  }
851 
852  void Read(FileScanner& scanner) override;
853  void Write(FileWriter& writer) override;
854 
855  LayerFeatureValue& operator=(const FeatureValue& other) override;
856  bool operator==(const FeatureValue& other) const override;
857  };
858 
860  {
861  private:
862  TagId tagLayer;
863 
864  public:
866  static const char* const NAME;
867 
868  public:
869  void Initialize(TagRegistry& tagRegistry) override;
870 
871  std::string GetName() const override;
872 
873  size_t GetValueAlignment() const override;
874  size_t GetValueSize() const override;
875  FeatureValue* AllocateValue(void* buffer) override;
876 
877  void Parse(TagErrorReporter& reporter,
878  const TagRegistry& tagRegistry,
879  const FeatureInstance& feature,
880  const ObjectOSMRef& object,
881  const TagMap& tags,
882  FeatureValueBuffer& buffer) const override;
883  };
884 
886  {
887  private:
888  uint8_t width=0;
889 
890  public:
891  WidthFeatureValue() = default;
892 
893  explicit WidthFeatureValue(uint8_t width)
894  : width(width)
895  {
896  // no code
897  }
898 
899  void SetWidth(uint8_t width)
900  {
901  this->width=width;
902  }
903 
904  uint8_t GetWidth() const
905  {
906  return width;
907  }
908 
909  void Read(FileScanner& scanner) override;
910  void Write(FileWriter& writer) override;
911 
912  WidthFeatureValue& operator=(const FeatureValue& other) override;
913  bool operator==(const FeatureValue& other) const override;
914  };
915 
917  {
918  private:
919  TagId tagWidth;
920 
921  public:
923  static const char* const NAME;
924 
925  public:
926  void Initialize(TagRegistry& tagRegistry) override;
927 
928  std::string GetName() const override;
929 
930  size_t GetValueAlignment() const override;
931  size_t GetValueSize() const override;
932  FeatureValue* AllocateValue(void* buffer) override;
933 
934  void Parse(TagErrorReporter& reporter,
935  const TagRegistry& tagRegistry,
936  const FeatureInstance& feature,
937  const ObjectOSMRef& object,
938  const TagMap& tags,
939  FeatureValueBuffer& buffer) const override;
940  };
941 
943  {
944  private:
945  uint8_t maxSpeed=0;
946 
947  public:
948  MaxSpeedFeatureValue() = default;
949 
950  explicit MaxSpeedFeatureValue(uint8_t maxSpeed)
951  : maxSpeed(maxSpeed)
952  {
953  // no code
954  }
955 
956  void SetMaxSpeed(uint8_t maxSpeed)
957  {
958  this->maxSpeed=maxSpeed;
959  }
960 
961  uint8_t GetMaxSpeed() const
962  {
963  return maxSpeed;
964  }
965 
966  void Read(FileScanner& scanner) override;
967  void Write(FileWriter& writer) override;
968 
969  MaxSpeedFeatureValue& operator=(const FeatureValue& other) override;
970  bool operator==(const FeatureValue& other) const override;
971  };
972 
974  {
975  private:
976  TagId tagMaxSpeed;
977  TagId tagMaxSpeedForward;
978  TagId tagMaxSpeedBackward;
979 
980  public:
982  static const char* const NAME;
983 
984  private:
985  bool GetTagValue(TagErrorReporter& errorReporter,
986  const TagRegistry& tagRegistry,
987  const ObjectOSMRef& object,
988  const TagMap& tags,
989  const std::string& input,
990  uint8_t& speed) const;
991 
992  public:
993  void Initialize(TagRegistry& tagRegistry) override;
994 
995  std::string GetName() const override;
996 
997  size_t GetValueAlignment() const override;
998  size_t GetValueSize() const override;
999  FeatureValue* AllocateValue(void* buffer) override;
1000 
1001  void Parse(TagErrorReporter& reporter,
1002  const TagRegistry& tagRegistry,
1003  const FeatureInstance& feature,
1004  const ObjectOSMRef& object,
1005  const TagMap& tags,
1006  FeatureValueBuffer& buffer) const override;
1007  };
1008 
1010  {
1011  private:
1012  uint8_t grade=0;
1013 
1014  public:
1015  GradeFeatureValue() = default;
1016 
1017  explicit GradeFeatureValue(uint8_t grade)
1018  : grade(grade)
1019  {
1020  // no code
1021  }
1022 
1023  void SetGrade(uint8_t grade)
1024  {
1025  this->grade=grade;
1026  }
1027 
1028  uint8_t GetGrade() const
1029  {
1030  return grade;
1031  }
1032 
1033  void Read(FileScanner& scanner) override;
1034  void Write(FileWriter& writer) override;
1035 
1036  GradeFeatureValue& operator=(const FeatureValue& other) override;
1037  bool operator==(const FeatureValue& other) const override;
1038  };
1039 
1041  {
1042  private:
1043  TagId tagSurface;
1044  TagId tagTrackType;
1045 
1046  public:
1048  static const char* const NAME;
1049 
1050  public:
1051  void Initialize(TagRegistry& tagRegistry) override;
1052 
1053  std::string GetName() const override;
1054 
1055  size_t GetValueAlignment() const override;
1056  size_t GetValueSize() const override;
1057  FeatureValue* AllocateValue(void* buffer) override;
1058 
1059  void Parse(TagErrorReporter& reporter,
1060  const TagRegistry& tagRegistry,
1061  const FeatureInstance& feature,
1062  const ObjectOSMRef& object,
1063  const TagMap& tags,
1064  FeatureValueBuffer& buffer) const override;
1065  };
1066 
1068  {
1069  private:
1070  uint8_t adminLevel=0;
1071  std::string isIn;
1072 
1073  public:
1074  AdminLevelFeatureValue() = default;
1075 
1076  AdminLevelFeatureValue(uint8_t adminLevel,
1077  const std::string& isIn)
1078  : adminLevel(adminLevel),
1079  isIn(isIn)
1080  {
1081  // no code
1082  }
1083 
1084  void SetAdminLevel(uint8_t adminLevel)
1085  {
1086  this->adminLevel=adminLevel;
1087  }
1088 
1089  void SetIsIn(const std::string& isIn)
1090  {
1091  this->isIn=isIn;
1092  }
1093 
1094  uint8_t GetAdminLevel() const
1095  {
1096  return adminLevel;
1097  }
1098 
1099  std::string GetIsIn() const
1100  {
1101  return isIn;
1102  }
1103 
1104  void Read(FileScanner& scanner) override;
1105  void Write(FileWriter& writer) override;
1106 
1107  AdminLevelFeatureValue& operator=(const FeatureValue& other) override;
1108  bool operator==(const FeatureValue& other) const override;
1109  };
1110 
1112  {
1113  private:
1114  TagId tagAdminLevel;
1115  TagId tagIsIn;
1116 
1117  public:
1119  static const char* const NAME;
1120 
1121  public:
1122  void Initialize(TagRegistry& tagRegistry) override;
1123 
1124  std::string GetName() const override;
1125 
1126  size_t GetValueAlignment() const override;
1127  size_t GetValueSize() const override;
1128  FeatureValue* AllocateValue(void* buffer) override;
1129 
1130  void Parse(TagErrorReporter& reporter,
1131  const TagRegistry& tagRegistry,
1132  const FeatureInstance& feature,
1133  const ObjectOSMRef& object,
1134  const TagMap& tags,
1135  FeatureValueBuffer& buffer) const override;
1136  };
1137 
1139  {
1140  private:
1141  std::string postalCode;
1142 
1143  public:
1144  PostalCodeFeatureValue() = default;
1145 
1146  explicit PostalCodeFeatureValue(const std::string& postalCode)
1147  : postalCode(postalCode)
1148  {
1149  // no code
1150  }
1151 
1152  void SetPostalCode(const std::string& postalCode)
1153  {
1154  this->postalCode=postalCode;
1155  }
1156 
1157  std::string GetPostalCode() const
1158  {
1159  return postalCode;
1160  }
1161 
1162  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
1163  {
1164  return postalCode;
1165  }
1166 
1167  void Read(FileScanner& scanner) override;
1168  void Write(FileWriter& writer) override;
1169 
1170  PostalCodeFeatureValue& operator=(const FeatureValue& other) override;
1171  bool operator==(const FeatureValue& other) const override;
1172  };
1173 
1175  {
1176  private:
1177  TagId tagPostalCode;
1178  TagId tagAddrPostCode;
1179 
1180  public:
1182  static const char* const NAME;
1183 
1185  static const char* const NAME_LABEL;
1186 
1188  static const size_t NAME_LABEL_INDEX;
1189 
1190  public:
1192 
1193  void Initialize(TagRegistry& tagRegistry) override;
1194 
1195  std::string GetName() const override;
1196 
1197  size_t GetValueAlignment() const override;
1198  size_t GetValueSize() const override;
1199  FeatureValue* AllocateValue(void* buffer) override;
1200 
1201  void Parse(TagErrorReporter& reporter,
1202  const TagRegistry& tagRegistry,
1203  const FeatureInstance& feature,
1204  const ObjectOSMRef& object,
1205  const TagMap& tags,
1206  FeatureValueBuffer& buffer) const override;
1207  };
1208 
1210  {
1211  private:
1212  TagId tagBridge;
1213 
1214  public:
1216  static const char* const NAME;
1217 
1218  public:
1219  void Initialize(TagRegistry& tagRegistry) override;
1220 
1221  std::string GetName() const override;
1222 
1223  void Parse(TagErrorReporter& reporter,
1224  const TagRegistry& tagRegistry,
1225  const FeatureInstance& feature,
1226  const ObjectOSMRef& object,
1227  const TagMap& tags,
1228  FeatureValueBuffer& buffer) const override;
1229  };
1230 
1232  {
1233  private:
1234  TagId tagTunnel;
1235 
1236  public:
1238  static const char* const NAME;
1239 
1240  public:
1241  void Initialize(TagRegistry& tagRegistry) override;
1242 
1243  std::string GetName() const override;
1244 
1245  void Parse(TagErrorReporter& reporter,
1246  const TagRegistry& tagRegistry,
1247  const FeatureInstance& feature,
1248  const ObjectOSMRef& object,
1249  const TagMap& tags,
1250  FeatureValueBuffer& buffer) const override;
1251  };
1252 
1254  {
1255  private:
1256  TagId tagEmbankment;
1257 
1258  public:
1260  static const char* const NAME;
1261 
1262  public:
1263  void Initialize(TagRegistry& tagRegistry) override;
1264 
1265  std::string GetName() const override;
1266 
1267  void Parse(TagErrorReporter& reporter,
1268  const TagRegistry& tagRegistry,
1269  const FeatureInstance& feature,
1270  const ObjectOSMRef& object,
1271  const TagMap& tags,
1272  FeatureValueBuffer& buffer) const override;
1273  };
1274 
1276  {
1277  private:
1278  TagId tagJunction;
1279 
1280  public:
1282  static const char* const NAME;
1283 
1284  public:
1285  void Initialize(TagRegistry& tagRegistry) override;
1286 
1287  std::string GetName() const override;
1288 
1289  void Parse(TagErrorReporter& reporter,
1290  const TagRegistry& tagRegistry,
1291  const FeatureInstance& feature,
1292  const ObjectOSMRef& object,
1293  const TagMap& tags,
1294  FeatureValueBuffer& buffer) const override;
1295  };
1296 
1298  {
1299  private:
1300  uint32_t ele=0;
1301 
1302  public:
1303  EleFeatureValue() = default;
1304 
1305  explicit EleFeatureValue(uint32_t ele)
1306  : ele(ele)
1307  {
1308  // no code
1309  }
1310 
1311  void SetEle(uint32_t ele)
1312  {
1313  this->ele=ele;
1314  }
1315 
1316  uint32_t GetEle() const
1317  {
1318  return ele;
1319  }
1320 
1321  std::string GetLabel(const Locale &locale, size_t labelIndex) const override;
1322 
1323  void Read(FileScanner& scanner) override;
1324  void Write(FileWriter& writer) override;
1325 
1326  EleFeatureValue& operator=(const FeatureValue& other) override;
1327  bool operator==(const FeatureValue& other) const override;
1328  };
1329 
1331  {
1332  private:
1333  TagId tagEle;
1334 
1335  public:
1337  static const char* const NAME;
1338 
1340  static const char* const IN_METER_LABEL;
1341 
1343  static const size_t IN_METER_LABEL_INDEX;
1344 
1346  static const char* const IN_FEET_LABEL;
1347 
1349  static const size_t IN_FEET_LABEL_INDEX;
1350 
1352  static const char* const IN_LOCALE_UNIT_LABEL;
1353 
1355  static const size_t IN_LOCALE_UNIT_LABEL_INDEX;
1356 
1357  public:
1358  EleFeature();
1359  void Initialize(TagRegistry& tagRegistry) override;
1360 
1361  std::string GetName() const override;
1362 
1363  size_t GetValueAlignment() const override;
1364  size_t GetValueSize() const override;
1365  FeatureValue* AllocateValue(void* buffer) override;
1366 
1367  void Parse(TagErrorReporter& reporter,
1368  const TagRegistry& tagRegistry,
1369  const FeatureInstance& feature,
1370  const ObjectOSMRef& object,
1371  const TagMap& tags,
1372  FeatureValueBuffer& buffer) const override;
1373  };
1374 
1376  {
1377  private:
1378  std::string destination;
1379 
1380  public:
1381  DestinationFeatureValue() = default;
1382 
1383  explicit DestinationFeatureValue(const std::string& destination)
1384  : destination(destination)
1385  {
1386  // no code
1387  }
1388 
1389  void SetDestination(const std::string& destination)
1390  {
1391  this->destination=destination;
1392  }
1393 
1394  std::string GetDestination() const
1395  {
1396  return destination;
1397  }
1398 
1399  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
1400  {
1401  return destination;
1402  }
1403 
1404  void Read(FileScanner& scanner) override;
1405  void Write(FileWriter& writer) override;
1406 
1407  DestinationFeatureValue& operator=(const FeatureValue& other) override;
1408  bool operator==(const FeatureValue& other) const override;
1409  };
1410 
1412  {
1413  private:
1414  TagId tagDestination;
1415  TagId tagDestinationRef;
1416  TagId tagDestinationForward;
1417 
1418  public:
1420  static const char* const NAME;
1421 
1423  static const char* const NAME_LABEL;
1424 
1426  static const size_t NAME_LABEL_INDEX;
1427 
1428  public:
1430  void Initialize(TagRegistry& tagRegistry) override;
1431 
1432  std::string GetName() const override;
1433 
1434  size_t GetValueAlignment() const override;
1435  size_t GetValueSize() const override;
1436  FeatureValue* AllocateValue(void* buffer) override;
1437 
1438  void Parse(TagErrorReporter& reporter,
1439  const TagRegistry& tagRegistry,
1440  const FeatureInstance& feature,
1441  const ObjectOSMRef& object,
1442  const TagMap& tags,
1443  FeatureValueBuffer& buffer) const override;
1444  };
1445 
1447  {
1448  private:
1449  TagId tagBuilding;
1450 
1451  public:
1453  static const char* const NAME;
1454 
1455  public:
1456  void Initialize(TagRegistry& tagRegistry) override;
1457 
1458  std::string GetName() const override;
1459 
1460  void Parse(TagErrorReporter& reporter,
1461  const TagRegistry& tagRegistry,
1462  const FeatureInstance& feature,
1463  const ObjectOSMRef& object,
1464  const TagMap& tags,
1465  FeatureValueBuffer& buffer) const override;
1466  };
1467 
1469  {
1470  private:
1471  std::string website;
1472 
1473  public:
1474  WebsiteFeatureValue() = default;
1475 
1476  explicit WebsiteFeatureValue(const std::string& website)
1477  : website(website)
1478  {
1479  // no code
1480  }
1481 
1482  void SetWebsite(const std::string& website)
1483  {
1484  this->website=website;
1485  }
1486 
1487  std::string GetWebsite() const
1488  {
1489  return website;
1490  }
1491 
1492  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
1493  {
1494  return website;
1495  }
1496 
1497  void Read(FileScanner& scanner) override;
1498  void Write(FileWriter& writer) override;
1499 
1500  WebsiteFeatureValue& operator=(const FeatureValue& other) override;
1501  bool operator==(const FeatureValue& other) const override;
1502  };
1503 
1505  {
1506  private:
1507  TagId tagWebsite;
1508  TagId tagContactWebsite;
1509 
1510  public:
1512  static const char* const NAME;
1513 
1515  static const char* const URL_LABEL;
1516 
1518  static const size_t URL_LABEL_INDEX;
1519 
1520  public:
1521  WebsiteFeature();
1522  void Initialize(TagRegistry& tagRegistry) override;
1523 
1524  std::string GetName() const override;
1525 
1526  size_t GetValueAlignment() const override;
1527  size_t GetValueSize() const override;
1528  FeatureValue* AllocateValue(void* buffer) override;
1529 
1530  void Parse(TagErrorReporter& reporter,
1531  const TagRegistry& tagRegistry,
1532  const FeatureInstance& feature,
1533  const ObjectOSMRef& object,
1534  const TagMap& tags,
1535  FeatureValueBuffer& buffer) const override;
1536  };
1537 
1538 
1540  {
1541  private:
1542  std::string phone;
1543 
1544  public:
1545  PhoneFeatureValue() = default;
1546 
1547  explicit PhoneFeatureValue(const std::string& phone)
1548  : phone(phone)
1549  {
1550  // no code
1551  }
1552 
1553  void SetPhone(const std::string& phone)
1554  {
1555  this->phone=phone;
1556  }
1557 
1558  std::string GetPhone() const
1559  {
1560  return phone;
1561  }
1562 
1563  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
1564  {
1565  return phone;
1566  }
1567 
1568  void Read(FileScanner& scanner) override;
1569  void Write(FileWriter& writer) override;
1570 
1571  PhoneFeatureValue& operator=(const FeatureValue& other) override;
1572  bool operator==(const FeatureValue& other) const override;
1573  };
1574 
1576  {
1577  private:
1578  TagId tagPhone;
1579  TagId tagContactPhone;
1580  TagId tagContactMobile;
1581 
1582  public:
1584  static const char* const NAME;
1585 
1587  static const char* const NUMBER_LABEL;
1588 
1590  static const size_t NUMBER_LABEL_INDEX;
1591 
1592  public:
1593  PhoneFeature();
1594  void Initialize(TagRegistry& tagRegistry) override;
1595 
1596  std::string GetName() const override;
1597 
1598  size_t GetValueAlignment() const override;
1599  size_t GetValueSize() const override;
1600  FeatureValue* AllocateValue(void* buffer) override;
1601 
1602  void Parse(TagErrorReporter& reporter,
1603  const TagRegistry& tagRegistry,
1604  const FeatureInstance& feature,
1605  const ObjectOSMRef& object,
1606  const TagMap& tags,
1607  FeatureValueBuffer& buffer) const override;
1608  };
1609 
1611  {
1612  private:
1613  std::string isIn;
1614 
1615  public:
1616  IsInFeatureValue() = default;
1617 
1618  explicit IsInFeatureValue(const std::string& isIn)
1619  : isIn(isIn)
1620  {
1621  // no code
1622  }
1623 
1624  void SetIsIn(const std::string& isIn)
1625  {
1626  this->isIn=isIn;
1627  }
1628 
1629  std::string GetIsIn() const
1630  {
1631  return isIn;
1632  }
1633 
1634  void Read(FileScanner& scanner) override;
1635  void Write(FileWriter& writer) override;
1636 
1637  IsInFeatureValue& operator=(const FeatureValue& other) override;
1638  bool operator==(const FeatureValue& other) const override;
1639  };
1640 
1642  {
1643  private:
1644  TagId tagIsIn;
1645 
1646  public:
1648  static const char* const NAME;
1649 
1650  public:
1651  void Initialize(TagRegistry& tagRegistry) override;
1652 
1653  std::string GetName() const override;
1654 
1655  size_t GetValueAlignment() const override;
1656  size_t GetValueSize() const override;
1657  FeatureValue* AllocateValue(void* buffer) override;
1658 
1659  void Parse(TagErrorReporter& reporter,
1660  const TagRegistry& tagRegistry,
1661  const FeatureInstance& feature,
1662  const ObjectOSMRef& object,
1663  const TagMap& tags,
1664  FeatureValueBuffer& buffer) const override;
1665  };
1666 
1668  {
1669  private:
1670  int startYear=0;
1671  int endYear=0;
1672 
1673  public:
1674  ConstructionYearFeatureValue() = default;
1675 
1676  ConstructionYearFeatureValue(int startYear, int endYear)
1677  : startYear(startYear),
1678  endYear(endYear)
1679  {
1680  // no code
1681  }
1682 
1683  void SetStartYear(int year)
1684  {
1685  this->startYear=year;
1686  }
1687 
1688  int GetStartYear() const
1689  {
1690  return startYear;
1691  }
1692 
1693  void SetEndYear(int year)
1694  {
1695  this->endYear=year;
1696  }
1697 
1698  int GetEndYear() const
1699  {
1700  return endYear;
1701  }
1702 
1703  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
1704  {
1705  if (startYear==endYear) {
1706  return std::to_string(startYear);
1707  }
1708 
1709  return std::to_string(startYear)+"-"+std::to_string(endYear);
1710  }
1711 
1712  void Read(FileScanner& scanner) override;
1713  void Write(FileWriter& writer) override;
1714 
1715  ConstructionYearFeatureValue& operator=(const FeatureValue& other) override;
1716  bool operator==(const FeatureValue& other) const override;
1717  };
1718 
1720  {
1721  private:
1722  TagId tagConstructionYear;
1723  TagId tagStartDate;
1724 
1725  public:
1727  static const char* const NAME;
1728 
1730  static const char* const YEAR_LABEL;
1731 
1733  static const size_t YEAR_LABEL_INDEX;
1734 
1735  public:
1737  void Initialize(TagRegistry& tagRegistry) override;
1738 
1739  std::string GetName() const override;
1740 
1741  size_t GetValueAlignment() const override;
1742  size_t GetValueSize() const override;
1743  FeatureValue* AllocateValue(void* buffer) override;
1744 
1745  void Parse(TagErrorReporter& reporter,
1746  const TagRegistry& tagRegistry,
1747  const FeatureInstance& feature,
1748  const ObjectOSMRef& object,
1749  const TagMap& tags,
1750  FeatureValueBuffer& buffer) const override;
1751  };
1752 
1754  {
1755  public:
1756  enum Feature : uint8_t {
1757  sidewalkTrackLeft = 1u << 0u,
1758  sidewalkTrackRight = 1u << 1u,
1759  cyclewayLaneLeft = 1u << 2u,
1760  cyclewayLaneRight = 1u << 3u,
1761  cyclewayTrackLeft = 1u << 4u,
1762  cyclewayTrackRight = 1u << 5u,
1763  };
1764 
1765  private:
1766  uint8_t featureSet=0;
1767 
1768  public:
1769  SidewayFeatureValue() = default;
1770 
1771  bool IsFlagSet(size_t flagIndex) const override
1772  {
1773  return (featureSet & (1<< flagIndex))!=0;
1774  }
1775 
1776  void SetFeatureSet(uint8_t featureSet)
1777  {
1778  this->featureSet=featureSet;
1779  }
1780 
1782  {
1783  return (featureSet & sidewalkTrackLeft)!=0;
1784  }
1785 
1787  {
1788  return (featureSet & sidewalkTrackRight)!=0;
1789  }
1790 
1791  bool HasCyclewayLaneLeft() const
1792  {
1793  return (featureSet & cyclewayLaneLeft)!=0;
1794  }
1795 
1797  {
1798  return (featureSet & cyclewayLaneRight)!=0;
1799  }
1800 
1802  {
1803  return (featureSet & cyclewayTrackLeft)!=0;
1804  }
1805 
1807  {
1808  return (featureSet & cyclewayTrackRight)!=0;
1809  }
1810 
1811  void Read(FileScanner& scanner) override;
1812  void Write(FileWriter& writer) override;
1813 
1814  SidewayFeatureValue& operator=(const FeatureValue& other) override;
1815  bool operator==(const FeatureValue& other) const override;
1816  };
1817 
1819  {
1820  private:
1821  enum class FeatureFlags: uint8_t {
1822  sidewalkTrackLeft = 0,
1823  sidewalkTrackRight = 1,
1824  cyclewayLaneLeft = 2,
1825  cyclewayLaneRight = 3,
1826  cyclewayTrackLeft = 4,
1827  cyclewayTrackRight = 5
1828  };
1829 
1830  private:
1831  TagId tagSidewalk;
1832  TagId tagCyclewayLeft;
1833  TagId tagCyclewayLeftSegregated;
1834  TagId tagCyclewayRight;
1835  TagId tagCyclewayRightSegregated;
1836 
1837  public:
1839  static const char* const NAME;
1840 
1841  public:
1842  SidewayFeature();
1843  void Initialize(TagRegistry& tagRegistry) override;
1844 
1845  std::string GetName() const override;
1846 
1847  size_t GetValueAlignment() const override;
1848  size_t GetValueSize() const override;
1849  FeatureValue* AllocateValue(void* buffer) override;
1850 
1851  void Parse(TagErrorReporter& reporter,
1852  const TagRegistry& tagRegistry,
1853  const FeatureInstance& feature,
1854  const ObjectOSMRef& object,
1855  const TagMap& tags,
1856  FeatureValueBuffer& buffer) const override;
1857  };
1858 
1860  {
1861  private:
1862 
1863  uint8_t lanes=0;
1864  std::string turnForward;
1865  std::string turnBackward;
1866  std::string destinationForward;
1867  std::string destinationBackward;
1868 
1869  public:
1870  LanesFeatureValue() = default;
1871 
1872  explicit LanesFeatureValue(uint8_t lanes)
1873  : lanes(lanes)
1874  {
1875  // no code
1876  }
1877 
1878  void SetLanes(uint8_t forwardLanes, uint8_t backwardLanes)
1879  {
1880  this->lanes=((forwardLanes & (uint8_t)0x7) << 2) |
1881  ((backwardLanes & (uint8_t)0x7) << 5);
1882  }
1883 
1884  bool HasSingleLane() const
1885  {
1886  return GetLanes()==0;
1887  }
1888 
1889  uint8_t GetForwardLanes() const
1890  {
1891  return (lanes >> 2) & (uint8_t)0x07;
1892  }
1893 
1894  uint8_t GetBackwardLanes() const
1895  {
1896  return (lanes >> 5) & (uint8_t)0x07;
1897  }
1898 
1899  uint8_t GetLanes() const;
1900 
1901  void SetTurnLanes(const std::string& turnForward,
1902  const std::string& turnBawckard)
1903  {
1904  this->turnForward=turnForward;
1905  this->turnBackward=turnBawckard;
1906  }
1907 
1908  std::string GetTurnForward() const
1909  {
1910  return turnForward;
1911  }
1912 
1913  std::string GetTurnBackward() const
1914  {
1915  return turnBackward;
1916  }
1917 
1918  std::string GetDestinationForward() const
1919  {
1920  return destinationForward;
1921  }
1922 
1923  std::string GetDestinationBackward() const
1924  {
1925  return destinationBackward;
1926  }
1927 
1928  void SetDestinationLanes(const std::string& destinationForward,
1929  const std::string& destinationBawckard)
1930  {
1931  this->destinationForward=destinationForward;
1932  this->destinationBackward=destinationBawckard;
1933  }
1934 
1935  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
1936  {
1937  if (HasSingleLane()) {
1938  return "1";
1939  }
1940 
1941  return std::to_string(GetForwardLanes()) + " " + std::to_string(GetBackwardLanes());
1942  }
1943 
1944  void Read(FileScanner& scanner) override;
1945  void Write(FileWriter& writer) override;
1946 
1947  LanesFeatureValue& operator=(const FeatureValue& other) override;
1948  bool operator==(const FeatureValue& other) const override;
1949  };
1950 
1952  {
1953  private:
1954  TagId tagOneway;
1955  TagId tagLanes;
1956  TagId tagLanesForward;
1957  TagId tagLanesBackward;
1958  TagId tagTurnLanes;
1959  TagId tagTurnLanesForward;
1960  TagId tagTurnLanesBackward;
1961  TagId tagDestinationLanes;
1962  TagId tagDestinationLanesForward;
1963  TagId tagDestinationLanesBackward;
1964 
1965  public:
1967  static const char* const NAME;
1968 
1970  static const char* const NAME_LABEL;
1971 
1973  static const size_t NAME_LABEL_INDEX;
1974 
1975  public:
1976  LanesFeature();
1977  void Initialize(TagRegistry& tagRegistry) override;
1978 
1979  std::string GetName() const override;
1980 
1981  size_t GetValueAlignment() const override;
1982  size_t GetValueSize() const override;
1983  FeatureValue* AllocateValue(void* buffer) override;
1984 
1985  void Parse(TagErrorReporter& reporter,
1986  const TagRegistry& tagRegistry,
1987  const FeatureInstance& feature,
1988  const ObjectOSMRef& object,
1989  const TagMap& tags,
1990  FeatureValueBuffer& buffer) const override;
1991  };
1992 
1994  {
1995  private:
1996  std::string op;
1997 
1998  public:
1999  OperatorFeatureValue() = default;
2000  OperatorFeatureValue(const OperatorFeatureValue& featureValue) = default;
2001 
2002  explicit OperatorFeatureValue(const std::string& op)
2003  : op(op)
2004  {
2005  // no code
2006  }
2007 
2008  void SetOperator(const std::string& op)
2009  {
2010  this->op=op;
2011  }
2012 
2013  std::string GetOperator() const
2014  {
2015  return op;
2016  }
2017 
2018  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
2019  {
2020  return op;
2021  }
2022 
2023  void Read(FileScanner& scanner) override;
2024  void Write(FileWriter& writer) override;
2025 
2026  OperatorFeatureValue& operator=(const FeatureValue& other) override;
2027  bool operator==(const FeatureValue& other) const override;
2028  };
2029 
2031  {
2032  private:
2033  TagId tagOperator;
2034 
2035  public:
2037  static const char* const NAME;
2038 
2040  static const char* const NAME_LABEL;
2041 
2043  static const size_t NAME_LABEL_INDEX;
2044 
2045  public:
2046  OperatorFeature();
2047  void Initialize(TagRegistry& tagRegistry) override;
2048 
2049  std::string GetName() const override;
2050 
2051  size_t GetValueAlignment() const override;
2052  size_t GetValueSize() const override;
2053  FeatureValue* AllocateValue(void* buffer) override;
2054 
2055  void Parse(TagErrorReporter& reporter,
2056  const TagRegistry& tagRegistry,
2057  const FeatureInstance& feature,
2058  const ObjectOSMRef& object,
2059  const TagMap& tags,
2060  FeatureValueBuffer& buffer) const override;
2061  };
2062 
2064  {
2065  private:
2066  std::string network;
2067 
2068  public:
2069  NetworkFeatureValue() = default;
2070  NetworkFeatureValue(const NetworkFeatureValue& featureValue) = default;
2071 
2072  explicit NetworkFeatureValue(const std::string& network)
2073  : network(network)
2074  {
2075  // no code
2076  }
2077 
2078  void SetNetwork(const std::string& network)
2079  {
2080  this->network=network;
2081  }
2082 
2083  std::string GetNetwork() const
2084  {
2085  return network;
2086  }
2087 
2088  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
2089  {
2090  return network;
2091  }
2092 
2093  void Read(FileScanner& scanner) override;
2094  void Write(FileWriter& writer) override;
2095 
2096  NetworkFeatureValue& operator=(const FeatureValue& other) override;
2097  bool operator==(const FeatureValue& other) const override;
2098  };
2099 
2101  {
2102  private:
2103  TagId tagNetwork;
2104 
2105  public:
2107  static const char* const NAME;
2108 
2110  static const char* const NAME_LABEL;
2111 
2113  static const size_t NAME_LABEL_INDEX;
2114 
2115  public:
2116  NetworkFeature();
2117  void Initialize(TagRegistry& tagRegistry) override;
2118 
2119  std::string GetName() const override;
2120 
2121  size_t GetValueAlignment() const override;
2122  size_t GetValueSize() const override;
2123  FeatureValue* AllocateValue(void* buffer) override;
2124 
2125  void Parse(TagErrorReporter& reporter,
2126  const TagRegistry& tagRegistry,
2127  const FeatureInstance& feature,
2128  const ObjectOSMRef& object,
2129  const TagMap& tags,
2130  FeatureValueBuffer& buffer) const override;
2131  };
2132 
2134  {
2135  private:
2136  std::string from;
2137  std::string to;
2138 
2139  public:
2140  FromToFeatureValue() = default;
2141  FromToFeatureValue(const FromToFeatureValue& featureValue) = default;
2142 
2143  explicit FromToFeatureValue(const std::string& from,
2144  const std::string& to)
2145  : from(from),
2146  to(to)
2147  {
2148  // no code
2149  }
2150 
2151  const std::string& GetFrom() const
2152  {
2153  return from;
2154  }
2155 
2156  void SetFrom(const std::string& from)
2157  {
2158  FromToFeatureValue::from=from;
2159  }
2160 
2161  const std::string& GetTo() const
2162  {
2163  return to;
2164  }
2165 
2166  void SetTo(const std::string& to)
2167  {
2168  FromToFeatureValue::to=to;
2169  }
2170 
2171  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
2172  {
2173  if (!from.empty() && ! to.empty()) {
2174  return from + " => " + to;
2175  }
2176 
2177  if (!from.empty()) {
2178  return from + "=>";
2179  }
2180 
2181  if (!to.empty()) {
2182  return "=> " + to;
2183  }
2184 
2185  return "";
2186  }
2187 
2188  void Read(FileScanner& scanner) override;
2189  void Write(FileWriter& writer) override;
2190 
2191  FromToFeatureValue& operator=(const FeatureValue& other) override;
2192  bool operator==(const FeatureValue& other) const override;
2193  };
2194 
2196  {
2197  private:
2198  TagId tagFrom;
2199  TagId tagTo;
2200 
2201  public:
2203  static const char* const NAME;
2204 
2206  static const char* const NUMBER_LABEL;
2207 
2209  static const size_t NUMBER_LABEL_INDEX;
2210 
2211  public:
2212  FromToFeature();
2213  void Initialize(TagRegistry& tagRegistry) override;
2214 
2215  std::string GetName() const override;
2216 
2217  size_t GetValueAlignment() const override;
2218  size_t GetValueSize() const override;
2219  FeatureValue* AllocateValue(void* buffer) override;
2220 
2221  void Parse(TagErrorReporter& reporter,
2222  const TagRegistry& tagRegistry,
2223  const FeatureInstance& feature,
2224  const ObjectOSMRef& object,
2225  const TagMap& tags,
2226  FeatureValueBuffer& buffer) const override;
2227  };
2228 
2230  {
2231  private:
2232  Color color;
2233 
2234  public:
2235  ColorFeatureValue() = default;
2236  ColorFeatureValue(const ColorFeatureValue& featureValue) = default;
2237 
2238  explicit ColorFeatureValue(const Color& color)
2239  : color(color)
2240  {
2241  // no code
2242  }
2243 
2244  Color GetColor() const
2245  {
2246  return color;
2247  }
2248 
2249  void SetColor(const Color& color)
2250  {
2251  ColorFeatureValue::color=color;
2252  }
2253 
2254  std::string GetLabel(const Locale &/*locale*/, size_t /*labelIndex*/) const override
2255  {
2256  return color.ToHexString();
2257  }
2258 
2259  void Read(FileScanner& scanner) override;
2260  void Write(FileWriter& writer) override;
2261 
2262  ColorFeatureValue& operator=(const FeatureValue& other) override;
2263  bool operator==(const FeatureValue& other) const override;
2264  };
2265 
2267  {
2268  private:
2269  TagId tagColor;
2270  TagId tagSymbol;
2271 
2272  public:
2274  static const char* const NAME;
2275 
2277  static const char* const NUMBER_LABEL;
2278 
2280  static const size_t NUMBER_LABEL_INDEX;
2281 
2282  public:
2283  ColorFeature();
2284  void Initialize(TagRegistry& tagRegistry) override;
2285 
2286  std::string GetName() const override;
2287 
2288  size_t GetValueAlignment() const override;
2289  size_t GetValueSize() const override;
2290  FeatureValue* AllocateValue(void* buffer) override;
2291 
2292  void Parse(TagErrorReporter& reporter,
2293  const TagRegistry& tagRegistry,
2294  const FeatureInstance& feature,
2295  const ObjectOSMRef& object,
2296  const TagMap& tags,
2297  FeatureValueBuffer& buffer) const override;
2298  };
2299 }
2300 
2301 #endif
bool CanRouteCar() const
Definition: TypeFeatures.h:603
Definition: TypeFeatures.h:2030
Definition: TypeFeatures.h:274
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:1935
Definition: TypeFeatures.h:885
void SetTo(const std::string &to)
Definition: TypeFeatures.h:2166
void SetNameShort(const std::string &nameShort)
Definition: TypeFeatures.h:182
void SetIsIn(const std::string &isIn)
Definition: TypeFeatures.h:1089
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:1563
static const char *const NAME
Definition: TypeFeatures.h:1512
static const char *const NAME_LABEL
Definition: TypeFeatures.h:214
static const char *const NAME
Definition: TypeFeatures.h:1260
AddressFeatureValue(const std::string &address)
Definition: TypeFeatures.h:391
static const char *const IN_METER_LABEL
Definition: TypeFeatures.h:1340
static const char *const NAME
Definition: TypeFeatures.h:923
void SetOperator(const std::string &op)
Definition: TypeFeatures.h:2008
bool CanRouteBicycleForward() const
Definition: TypeFeatures.h:593
std::string GetIsIn() const
Definition: TypeFeatures.h:1629
static const char *const NAME
Definition: TypeFeatures.h:1420
Definition: OSMScoutTypes.h:59
Definition: TypeFeatures.h:1067
bool HasSidewalkTrackLeft() const
Definition: TypeFeatures.h:1781
static const char *const NUMBER_LABEL
Definition: TypeFeatures.h:2277
bool CanAccess(Vehicle vehicle) const
Definition: TypeFeatures.h:736
Definition: TypeFeatures.h:1468
void SetAdminLevel(uint8_t adminLevel)
Definition: TypeFeatures.h:1084
uint16_t TagId
Definition: Tag.h:39
void SetMaxSpeed(uint8_t maxSpeed)
Definition: TypeFeatures.h:956
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:2171
void SetLanes(uint8_t forwardLanes, uint8_t backwardLanes)
Definition: TypeFeatures.h:1878
static const char *const NAME
Definition: TypeFeatures.h:2107
static const char *const NAME
Definition: TypeFeatures.h:2203
bool HasCyclewayLaneLeft() const
Definition: TypeFeatures.h:1791
static const char *const NAME
Definition: TypeFeatures.h:1648
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:1426
static const char *const NAME_LABEL
Definition: TypeFeatures.h:1423
std::string GetPhone() const
Definition: TypeFeatures.h:1558
static const char *const NAME
Definition: TypeFeatures.h:1182
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:2018
static const char *const NUMBER_LABEL
Definition: TypeFeatures.h:2206
bool CanRoute() const
Definition: TypeFeatures.h:491
bool CanRouteCarForward() const
Definition: TypeFeatures.h:609
ColorFeatureValue(const Color &color)
Definition: TypeFeatures.h:2238
std::string GetLocation() const
Definition: TypeFeatures.h:325
static const char *const NAME
Definition: TypeFeatures.h:1337
void SetNameAlt(const std::string &nameAlt)
Definition: TypeFeatures.h:116
bool CanAccess() const
Definition: TypeFeatures.h:731
Definition: TypeFeatures.h:1539
Definition: TypeFeatures.h:1575
bool CanRouteForward(Vehicle vehicle) const
Definition: TypeFeatures.h:536
bool CanAccessFoot() const
Definition: TypeFeatures.h:767
WebsiteFeatureValue(const std::string &website)
Definition: TypeFeatures.h:1476
NameAltFeatureValue(const std::string &nameAlt)
Definition: TypeFeatures.h:110
Definition: TypeFeatures.h:799
bool CanRouteForward() const
Definition: TypeFeatures.h:531
Definition: TypeFeatures.h:973
uint8_t GetBackwardLanes() const
Definition: TypeFeatures.h:1894
Definition: TypeFeatures.h:71
static const char *const NAME_LABEL
Definition: TypeFeatures.h:78
Definition: TypeFeatures.h:641
Definition: TypeFeatures.h:454
Definition: TypeFeatures.h:168
MaxSpeedFeatureValue(uint8_t maxSpeed)
Definition: TypeFeatures.h:950
Definition: TypeFeatures.h:1138
std::string GetDestinationForward() const
Definition: TypeFeatures.h:1918
void SetAccess(uint8_t access)
Definition: TypeFeatures.h:721
Definition: TypeFeatures.h:1411
PhoneFeatureValue(const std::string &phone)
Definition: TypeFeatures.h:1547
uint8_t GetMaxSpeed() const
Definition: TypeFeatures.h:961
Definition: TypeFeatures.h:1111
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:434
void SetFeatureSet(uint8_t featureSet)
Definition: TypeFeatures.h:1776
Definition: TypeFeatures.h:1231
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:1188
PostalCodeFeatureValue(const std::string &postalCode)
Definition: TypeFeatures.h:1146
bool CanRoute(Vehicle vehicle) const
Definition: TypeFeatures.h:496
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:262
Definition: TypeFeatures.h:1753
LocationFeatureValue(const std::string &location)
Definition: TypeFeatures.h:314
DestinationFeatureValue(const std::string &destination)
Definition: TypeFeatures.h:1383
Vehicle
Definition: OSMScoutTypes.h:55
static const char *const NAME
Definition: TypeFeatures.h:669
static const char *const NAME
Definition: TypeFeatures.h:1048
static const char *const NAME
Definition: TypeFeatures.h:2274
void SetPhone(const std::string &phone)
Definition: TypeFeatures.h:1553
FromToFeatureValue(const std::string &from, const std::string &to)
Definition: TypeFeatures.h:2143
ConstructionYearFeatureValue(int startYear, int endYear)
Definition: TypeFeatures.h:1676
Definition: TypeFeatures.h:1610
bool HasCyclewayTrackRight() const
Definition: TypeFeatures.h:1806
Definition: TypeFeatures.h:1667
Definition: TypeFeatures.h:101
Definition: TypeFeatures.h:916
uint8_t GetAccess() const
Definition: TypeFeatures.h:486
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:1973
IsInFeatureValue(const std::string &isIn)
Definition: TypeFeatures.h:1618
Access
Definition: TypeFeatures.h:703
static const size_t IN_FEET_LABEL_INDEX
Definition: TypeFeatures.h:1349
static const char *const NAME
Definition: TypeFeatures.h:2037
bool HasCyclewayTrackLeft() const
Definition: TypeFeatures.h:1801
std::string GetTurnForward() const
Definition: TypeFeatures.h:1908
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:285
static const char *const NAME
Definition: TypeFeatures.h:1839
Definition: TypeFeatures.h:2195
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:407
Definition: TypeFeatures.h:1009
void SetEndYear(int year)
Definition: TypeFeatures.h:1693
static const char *const NAME
Definition: TypeFeatures.h:1584
void SetStartYear(int year)
Definition: TypeFeatures.h:1683
bool HasCyclewayLaneRight() const
Definition: TypeFeatures.h:1796
static const size_t URL_LABEL_INDEX
Definition: TypeFeatures.h:1518
static const char *const NAME_LABEL
Definition: TypeFeatures.h:145
Definition: OSMScoutTypes.h:57
bool IsFlagSet(size_t flagIndex) const override
Definition: TypeFeatures.h:1771
bool IsOnewayBackward() const
Definition: TypeFeatures.h:629
Definition: TypeFeatures.h:700
Definition: TypeFeatures.h:2063
int8_t GetLayer() const
Definition: TypeFeatures.h:847
void SetGrade(uint8_t grade)
Definition: TypeFeatures.h:1023
RefFeatureValue(const std::string &ref)
Definition: TypeFeatures.h:246
Access
Definition: TypeFeatures.h:457
Definition: TypeFeatures.h:1446
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:192
int GetEndYear() const
Definition: TypeFeatures.h:1698
Definition: TypeFeatures.h:1040
std::string GetDestination() const
Definition: TypeFeatures.h:1394
static const char *const NAME_LABEL
Definition: TypeFeatures.h:431
Definition: Area.h:38
static const char *const URL_LABEL
Definition: TypeFeatures.h:1515
std::string GetAddress() const
Definition: TypeFeatures.h:402
static const char *const NAME
Definition: TypeFeatures.h:982
Definition: TypeFeatures.h:419
Definition: TypeFeature.h:98
static const char *const NAME
Definition: TypeFeatures.h:866
void SetRef(const std::string &ref)
Definition: TypeFeatures.h:252
AccessFeatureValue(uint8_t access)
Definition: TypeFeatures.h:475
static const size_t NUMBER_LABEL_INDEX
Definition: TypeFeatures.h:2209
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:2043
static const char *const IN_LOCALE_UNIT_LABEL
Definition: TypeFeatures.h:1352
bool CanRouteBicycleBackward() const
Definition: TypeFeatures.h:598
EleFeatureValue(uint32_t ele)
Definition: TypeFeatures.h:1305
Definition: TypeFeatures.h:1330
Definition: TypeFeatures.h:1174
Definition: TypeFeature.h:40
void SetLayer(int8_t layer)
Definition: TypeFeatures.h:842
Definition: TypeFeatures.h:1375
Definition: TypeFeatures.h:2266
LanesFeatureValue(uint8_t lanes)
Definition: TypeFeatures.h:1872
void SetAccess(uint8_t access)
Definition: TypeFeatures.h:481
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:2113
uint8_t GetForwardLanes() const
Definition: TypeFeatures.h:1889
static const char *const NAME
Definition: TypeFeatures.h:1216
Definition: TypeFeatures.h:348
#define OSMSCOUT_API
Definition: CoreImportExport.h:45
std::string GetName() const
Definition: TypeFeatures.h:54
std::string GetRef() const
Definition: TypeFeatures.h:257
static const size_t NUMBER_LABEL_INDEX
Definition: TypeFeatures.h:2280
uint8_t GetAccess() const
Definition: TypeFeatures.h:726
const std::string & GetTo() const
Definition: TypeFeatures.h:2161
AdminLevelFeatureValue(uint8_t adminLevel, const std::string &isIn)
Definition: TypeFeatures.h:1076
Setup internal state of renderer for executing next steps with current projection and parameters...
Definition: MapPainter.h:57
std::string GetTurnBackward() const
Definition: TypeFeatures.h:1913
bool HasSidewalkTrackRight() const
Definition: TypeFeatures.h:1786
std::string GetNameShort() const
Definition: TypeFeatures.h:187
static const char *const NAME
Definition: TypeFeatures.h:1238
Color GetColor() const
Definition: TypeFeatures.h:2244
uint8_t GetWidth() const
Definition: TypeFeatures.h:904
static const char *const NUMBER_LABEL
Definition: TypeFeatures.h:1587
std::string GetPostalCode() const
Definition: TypeFeatures.h:1157
bool CanRouteCarBackward() const
Definition: TypeFeatures.h:614
Definition: TypeFeatures.h:942
Definition: TypeFeatures.h:305
static const char *const NAME
Definition: TypeFeatures.h:809
bool CanRouteBackward() const
Definition: TypeFeatures.h:551
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:126
Definition: TagErrorReporter.h:32
void SetFrom(const std::string &from)
Definition: TypeFeatures.h:2156
static const char *const NAME
Definition: TypeFeatures.h:75
static const char *const NAME_LABEL
Definition: TypeFeatures.h:1970
Definition: TypeFeatures.h:828
WidthFeatureValue(uint8_t width)
Definition: TypeFeatures.h:893
Definition: TypeFeatures.h:138
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:2254
Definition: TypeFeatures.h:2229
static const char *const NAME
Definition: TypeFeatures.h:1282
Feature
Definition: TypeFeatures.h:1756
std::string GetNameAlt() const
Definition: TypeFeatures.h:121
std::string GetDestinationBackward() const
Definition: TypeFeatures.h:1923
Definition: TypeFeatures.h:1993
static const size_t NUMBER_LABEL_INDEX
Definition: TypeFeatures.h:1590
void SetName(const std::string &name)
Definition: TypeFeatures.h:49
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:1492
bool CanAccessCar() const
Definition: TypeFeatures.h:777
bool IsOneway() const
Definition: TypeFeatures.h:619
NetworkFeatureValue(const std::string &network)
Definition: TypeFeatures.h:2072
static const char *const IN_FEET_LABEL
Definition: TypeFeatures.h:1346
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:1162
bool operator==(const MapView &a, const MapView &b)
Definition: InputHandler.h:222
void SetWebsite(const std::string &website)
Definition: TypeFeatures.h:1482
bool IsOnewayForward() const
Definition: TypeFeatures.h:624
Definition: TypeFeatures.h:1504
static const size_t IN_LOCALE_UNIT_LABEL_INDEX
Definition: TypeFeatures.h:1355
GradeFeatureValue(uint8_t grade)
Definition: TypeFeatures.h:1017
Definition: TypeFeatures.h:382
void SetColor(const Color &color)
Definition: TypeFeatures.h:2249
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:148
int GetStartYear() const
Definition: TypeFeatures.h:1688
bool HasSingleLane() const
Definition: TypeFeatures.h:1884
bool CanAccess(VehicleMask vehicleMask) const
Definition: TypeFeatures.h:751
std::string GetNetwork() const
Definition: TypeFeatures.h:2083
static const size_t IN_METER_LABEL_INDEX
Definition: TypeFeatures.h:1343
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:330
Definition: TypeFeatures.h:34
uint8_t GetAdminLevel() const
Definition: TypeFeatures.h:1094
static const char *const NAME
Definition: TypeFeatures.h:428
Definition: TypeFeatures.h:2100
std::string GetWebsite() const
Definition: TypeFeatures.h:1487
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:1703
Definition: TypeFeatures.h:237
std::string GetIsIn() const
Definition: TypeFeatures.h:1099
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:1399
void SetDestination(const std::string &destination)
Definition: TypeFeatures.h:1389
void SetIsIn(const std::string &isIn)
Definition: TypeFeatures.h:1624
void SetEle(uint32_t ele)
Definition: TypeFeatures.h:1311
Definition: TypeFeatures.h:1209
Definition: TypeFeatures.h:1951
static const char *const NAME
Definition: TypeFeatures.h:211
NameShortFeatureValue(const std::string &nameShort)
Definition: TypeFeatures.h:176
static const char *const NAME
Definition: TypeFeatures.h:281
bool CanRouteFootForward() const
Definition: TypeFeatures.h:577
static const char *const NAME
Definition: TypeFeatures.h:1453
NameFeatureValue(const std::string &name)
Definition: TypeFeatures.h:43
void SetLocation(const std::string &location)
Definition: TypeFeatures.h:320
bool CanRouteBackward(Vehicle vehicle) const
Definition: TypeFeatures.h:556
static const char *const NAME_LABEL
Definition: TypeFeatures.h:1185
Definition: TypeFeatures.h:1275
void SetPostalCode(const std::string &postalCode)
Definition: TypeFeatures.h:1152
bool CanRouteBicycle() const
Definition: TypeFeatures.h:587
static const char *const NAME
Definition: TypeFeatures.h:1727
static const char *const NAME_LABEL
Definition: TypeFeatures.h:283
void SetDestinationLanes(const std::string &destinationForward, const std::string &destinationBawckard)
Definition: TypeFeatures.h:1928
std::unordered_map< TagId, std::string > TagMap
Definition: Tag.h:41
bool CanRouteFoot() const
Definition: TypeFeatures.h:571
static const char *const NAME
Definition: TypeFeatures.h:142
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:81
Definition: TypeFeatures.h:1297
Definition: TypeFeatures.h:2133
uint32_t GetEle() const
Definition: TypeFeatures.h:1316
Definition: TypeFeatures.h:859
static const char *const YEAR_LABEL
Definition: TypeFeatures.h:1730
void SetNetwork(const std::string &network)
Definition: TypeFeatures.h:2078
static const size_t YEAR_LABEL_INDEX
Definition: TypeFeatures.h:1733
void SetAddress(const std::string &address)
Definition: TypeFeatures.h:397
Definition: TypeFeatures.h:1719
uint8_t VehicleMask
Definition: OSMScoutTypes.h:62
static const char *const NAME_LABEL
Definition: TypeFeatures.h:2110
Definition: TypeFeatures.h:204
static const char *const NAME
Definition: TypeFeatures.h:1967
bool CanRouteFootBackward() const
Definition: TypeFeatures.h:582
Definition: TypeFeatures.h:1818
static const size_t NAME_LABEL_INDEX
Definition: TypeFeatures.h:217
AccessRestrictedFeatureValue(uint8_t access)
Definition: TypeFeatures.h:715
Definition: TypeFeatures.h:1253
const std::string & GetFrom() const
Definition: TypeFeatures.h:2151
LayerFeatureValue(int8_t layer)
Definition: TypeFeatures.h:836
static const char *const NAME_LABEL
Definition: TypeFeatures.h:2040
static const char *const NAME
Definition: TypeFeatures.h:1119
void SetWidth(uint8_t width)
Definition: TypeFeatures.h:899
bool CanRoute(VehicleMask vehicleMask) const
Definition: TypeFeatures.h:511
Definition: TypeFeatures.h:1641
bool CanAccessBicycle() const
Definition: TypeFeatures.h:772
Definition: OSMScoutTypes.h:58
uint8_t GetGrade() const
Definition: TypeFeatures.h:1028
OperatorFeatureValue(const std::string &op)
Definition: TypeFeatures.h:2002
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:2088
Definition: TypeFeatures.h:1859
void SetTurnLanes(const std::string &turnForward, const std::string &turnBawckard)
Definition: TypeFeatures.h:1901
static const char *const NAME
Definition: TypeFeatures.h:357
std::string GetLabel(const Locale &, size_t) const override
Definition: TypeFeatures.h:59
std::string GetOperator() const
Definition: TypeFeatures.h:2013