ObjectSignal.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. #ifndef OBJECTSIGNAL_H
  2. #define OBJECTSIGNAL_H
  3. #include <vector>
  4. #include <string>
  5. using std::vector;
  6. using std::string;
  7. class Object_outlines_outline
  8. {
  9. private:
  10. vector<int> mid;
  11. vector<string> mfillType;
  12. vector<bool> mouter;
  13. vector<bool> mclosed;
  14. vector<string> mlaneTYpe;
  15. public:
  16. Object_outlines_outline();
  17. };
  18. class Object_outlines
  19. {
  20. private:
  21. vector<Object_outlines_outline> moutline;
  22. public:
  23. Object_outlines();
  24. };
  25. class Object_material
  26. {
  27. private:
  28. vector<string> msurface;
  29. vector<double> mfriction;
  30. vector<double> mroughness;
  31. public:
  32. Object_material();
  33. int Getsurface(string & surface);
  34. int Getfriction(double & friction);
  35. int Getroughness(double & roughness);
  36. void Setsurface(string surface);
  37. void Setfriction(double friction);
  38. void Setroughness(double roughness);
  39. };
  40. class Object_repeat
  41. {
  42. private:
  43. double ms;
  44. double mlength;
  45. double mdistance;
  46. double mtStart;
  47. double mtEnd;
  48. double mheightStart;
  49. double mheightEnd;
  50. double mzOffsetStart;
  51. double mzOffsetEnd;
  52. vector<double> mwidthStart;
  53. vector<double> mwidthEnd;
  54. vector<double> mlengthStart;
  55. vector<double> mlengthEnd;
  56. vector<double> mradiusStart;
  57. vector<double> mradiusEnd;
  58. public:
  59. Object_repeat(double s,double length,double distance,double tStart,double tEnd,double heightStart,
  60. double heightEnd,double zOffsetStart,double zOffsetEnd);
  61. double Gets();
  62. double Getlength();
  63. double Getdistance();
  64. double GettStart();
  65. double GettEnd();
  66. double GetheightStart();
  67. double GetheightEnd();
  68. double GetzOffsetStart();
  69. double GetzOffsetEnd();
  70. void Sets(double s);
  71. void Setlength(double length);
  72. void Setdistance(double distance);
  73. void SettStart(double tStart);
  74. void SettEnd(double tEnd);
  75. void SetheightStart(double heightStart);
  76. void SetheightEnd(double heightEnd);
  77. void SetzOffsetStart(double zOffsetStart);
  78. void SetzOffsetEnd(double zOffsetEnd);
  79. int GetwidthStart(double & widthStart);
  80. int GetwidthEnd(double & widthEnd);
  81. int GetlengthStart(double & lengthStart);
  82. int GetlengthEnd(double & lengthEnd);
  83. int GetradiusStart(double & radiusStart);
  84. int GetradiusEnd(double & radiusEnd);
  85. void DeletewidthStart();
  86. void DeletewidthEnd();
  87. void DeletelengthStart();
  88. void DeletelengthEnd();
  89. void DeleteradiusStart();
  90. void DeleteradiusEnd();
  91. void SetwidthStart(double widthStart);
  92. void SetwidthEnd(double widthEnd);
  93. void SetlengthStart(double lengthStart);
  94. void SetlengthEnd(double lengthEnd);
  95. void SetradiusStart(double radiusStart);
  96. void SetradiusEnd(double radiusEnd);
  97. bool CheckInterval(double s_check);
  98. };
  99. class Object_parkingSpace
  100. {
  101. private:
  102. string maccess;
  103. string mrestrictions;
  104. public:
  105. Object_parkingSpace();
  106. void Setaccess(string access);
  107. void Setrestrictions(string restrictions);
  108. string Getaccess();
  109. string Getrestrictions();
  110. /**
  111. * Copy constructor
  112. */
  113. Object_parkingSpace (const Object_parkingSpace& parkingSpace);
  114. /**
  115. * Assignment operator overload
  116. */
  117. const Object_parkingSpace& operator=(const Object_parkingSpace& rhs);
  118. };
  119. //***********************************************************************************
  120. //Object
  121. //***********************************************************************************
  122. class Object
  123. {
  124. private:
  125. double mt;
  126. double mzOffset;
  127. string mtype;
  128. vector<double> mvalidLength;
  129. string morientation;
  130. string msubtype;
  131. string mdynamic;
  132. vector<double> mhdg;
  133. string mname;
  134. vector<double> mpitch;
  135. string mid;
  136. vector<double> mroll;
  137. vector<double> mheight;
  138. double ms;
  139. vector<double> mlength;
  140. vector<double> mwidth;
  141. vector<double> mradius;
  142. vector<Object_parkingSpace> mObject_parkingSpace;
  143. vector<Object_repeat> mObject_repeat;
  144. vector<Object_material> mObject_material;
  145. unsigned int mLastAddedObjectrepeat;
  146. unsigned int mLastAddedObjectmaterial;
  147. public:
  148. Object(string id,double s,double t, double zOffset);
  149. double Gett();
  150. double GetzOffset();
  151. string Gettype();
  152. int GetvalidLength(double & validLength);
  153. string Getorientation();
  154. string Getsubtype();
  155. string Getdynamic();
  156. int Gethdg(double & hdg);
  157. string Getname();
  158. int Getpitch(double & pitch);
  159. string Getid();
  160. int Getroll(double & roll);
  161. int Getheight(double & height);
  162. double Gets();
  163. int Getlength(double & length);
  164. int Getwidth(double & width);
  165. int Getradius(double & radius);
  166. int GetparkingSpace(Object_parkingSpace & parkingSpace);
  167. void Sett(double t);
  168. void SetzOffset(double zOffset);
  169. void Settype(string type);
  170. void SetvalidLength(double validLength);
  171. void Setorientation(string orientation);
  172. void Setsubtype(string subtype);
  173. void Setdynamic(string dynamic);
  174. void Sethdg(double hdg);
  175. void Setname(string name);
  176. void Setpitch(double pitch);
  177. void Setid(string id);
  178. void Setroll(double roll);
  179. void Setheight(double height);
  180. void Sets(double s);
  181. void Setlength(double length);
  182. void Setwidth(double width);
  183. void Setradius(double radius);
  184. void SetparkingSpace(Object_parkingSpace parkingSpace);
  185. vector<Object_repeat> * GetObjectrepeatVector();
  186. Object_repeat* GetObjectrepeat(unsigned int i);
  187. unsigned int GetObjectrepeatCount();
  188. Object_repeat* GetLastObjectrepeat();
  189. Object_repeat* GetLastAddedObjectrepeat();
  190. unsigned int AddObjectrepeat(double s,double length,double distance,double tStart,double tEnd,
  191. double heightStart,double heightEnd,double zOffsetStart,double zOffsetEnd);
  192. unsigned int CloneObjectrepeat(unsigned int index);
  193. void DeleteObjectrepeat(unsigned int index);
  194. int CheckObjectrepeatInterval(double s_check);
  195. vector<Object_material> * GetObjectmaterialVector();
  196. Object_material* GetObjectmaterial(unsigned int i);
  197. unsigned int GetObjectmaterialCount();
  198. Object_material* GetLastObjectmaterial();
  199. Object_material* GetLastAddedObjectmaterial();
  200. unsigned int AddObjectmaterial();
  201. unsigned int CloneObjectmaterial(unsigned int index);
  202. void DeleteObjectmaterial(unsigned int index);
  203. };
  204. //----------------------------------------------------------------------------------
  205. class signal_positionRoad
  206. {
  207. private:
  208. double ms;
  209. double mt;
  210. double mzOffset;
  211. double mhOffset;
  212. double mpitch;
  213. double mroll;
  214. public:
  215. signal_positionRoad(double s,double t,double zOffset,double hOffset, double pitch,double roll);
  216. double Gets();
  217. double Gett();
  218. double GetzOffset();
  219. double GethOffset();
  220. double Getpitch();
  221. double Getroll();
  222. void Sets(double s);
  223. void Sett(double t);
  224. void SetzOffset(double zOffset);
  225. void SethOffset(double hOffset);
  226. void Setpitch(double pitch);
  227. void Setroll(double roll);
  228. };
  229. class signal_positionInertial
  230. {
  231. private:
  232. double mx;
  233. double my;
  234. double mz;
  235. double mhdg;
  236. double mpitch;
  237. double mroll;
  238. public:
  239. signal_positionInertial(double x,double y,double z,double hdg,double pitch,double roll );
  240. double Getx();
  241. double Gety();
  242. double Getz();
  243. double Gethdg();
  244. double Getpitch();
  245. double Getroll();
  246. void Setx(double x);
  247. void Sety(double y);
  248. void Setz(double z);
  249. void Sethdg(double hdg);
  250. void Setpitch(double pitch);
  251. void Setroll(double roll);
  252. };
  253. class signal_laneValidity
  254. {
  255. private:
  256. int mfromLane;
  257. int mtoLane;
  258. public:
  259. signal_laneValidity(int fromLane,int toLane);
  260. int GetfromLane();
  261. int GettoLane();
  262. void SetfromLane(int fromLane);
  263. void SettoLane(int toLane);
  264. };
  265. //***********************************************************************************
  266. //Signal
  267. //***********************************************************************************
  268. class Signal
  269. {
  270. private:
  271. double ms;
  272. double mt;
  273. string mid;
  274. string mname;
  275. bool mdynamic;
  276. string morientation;
  277. double mzOffset;
  278. string mtype;
  279. string mcountry;
  280. string mcountryRevision;
  281. string msubtype;
  282. double mhOffset;
  283. double mpitch;
  284. double mroll;
  285. double mheight;
  286. double mwidth;
  287. signal_positionRoad * mpsignal_positionRoad;
  288. signal_positionInertial * mpsignal_positionInertial;
  289. signal_laneValidity * mpsignal_laneValidity;
  290. public:
  291. Signal(double s,double t,string id,string name,bool dynamic,string orientation,double zOffset,string type,string country,string countryRevision,
  292. string subtype,double hOffset,double pitch,double roll ,double height,double width);
  293. Signal();
  294. ~Signal();
  295. Signal& operator=(const Signal& x);
  296. Signal(const Signal & x);
  297. double Gets();
  298. double Gett();
  299. string Getid();
  300. string Getname();
  301. bool Getdynamic();
  302. string Getorientation();
  303. double GetzOffset();
  304. string Gettype();
  305. string Getcountry();
  306. string GetcountryRevision();
  307. string Getsubtype();
  308. double GethOffset();
  309. double Getpitch();
  310. double Getroll();
  311. double Getheight();
  312. double Getwidth();
  313. signal_positionRoad * GetpositionRoad();
  314. signal_positionInertial * GetpositionInertial();
  315. signal_laneValidity * GetlaneValidity();
  316. void Sets(double s);
  317. void Sett(double t);
  318. void Setid(string id);
  319. void Setname(string name);
  320. void Setdynamic(bool dynamic);
  321. void Setorientation(string orientation);
  322. void SetzOffset(double zOffset);
  323. void Settype(string type);
  324. void Setcountry(string country);
  325. void SetcountryRevision(string countryRevision);
  326. void Setsubtype(string subtype);
  327. void SethOffset(double hOffset);
  328. void Setpitch(double pitch);
  329. void Setroll(double roll);
  330. void Setheight(double height);
  331. void Setwidth(double width);
  332. void SetlaneValidity(int fromLane, int toLane);
  333. void SetpositionRoad(double s,double t, double zOffset,double hOffset,double pitch,double roll);
  334. void SetpositionInertial(double x,double y, double z, double hdg,double pitch,double roll);
  335. };
  336. //----------------------------------------------------------------------------------
  337. #endif