JSON file in mbed.
Dependencies: MbedJSONValue SDFileSystem mbed
Fork of City_Game_JSON by
mission.h@5:eedf89829452, 2017-11-27 (annotated)
- Committer:
- ajeet3004
- Date:
- Mon Nov 27 05:22:40 2017 +0000
- Revision:
- 5:eedf89829452
- Parent:
- 2:e6a095fc2274
ghjh
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AlexVC97 | 2:e6a095fc2274 | 1 | #pragma once |
AlexVC97 | 2:e6a095fc2274 | 2 | #include <iostream> |
AlexVC97 | 2:e6a095fc2274 | 3 | #include "MbedJSONValue.h" |
AlexVC97 | 2:e6a095fc2274 | 4 | |
AlexVC97 | 2:e6a095fc2274 | 5 | namespace VivesCityGame |
AlexVC97 | 2:e6a095fc2274 | 6 | { |
AlexVC97 | 2:e6a095fc2274 | 7 | class Mission |
AlexVC97 | 2:e6a095fc2274 | 8 | { |
AlexVC97 | 2:e6a095fc2274 | 9 | // declarations |
ajeet3004 | 5:eedf89829452 | 10 | //private: //commented here by IC |
ajeet3004 | 5:eedf89829452 | 11 | public: |
AlexVC97 | 2:e6a095fc2274 | 12 | std::string type; |
AlexVC97 | 2:e6a095fc2274 | 13 | int id; |
AlexVC97 | 2:e6a095fc2274 | 14 | std::string message; |
AlexVC97 | 2:e6a095fc2274 | 15 | std::string hint; |
AlexVC97 | 2:e6a095fc2274 | 16 | bool deadline; |
AlexVC97 | 2:e6a095fc2274 | 17 | int deadlineTime; |
AlexVC97 | 2:e6a095fc2274 | 18 | double latitude; |
AlexVC97 | 2:e6a095fc2274 | 19 | double longitude; |
AlexVC97 | 2:e6a095fc2274 | 20 | int radius; |
AlexVC97 | 2:e6a095fc2274 | 21 | |
AlexVC97 | 2:e6a095fc2274 | 22 | // getters |
AlexVC97 | 2:e6a095fc2274 | 23 | public: |
AlexVC97 | 2:e6a095fc2274 | 24 | std::string get_type(); |
AlexVC97 | 2:e6a095fc2274 | 25 | int get_id(); |
AlexVC97 | 2:e6a095fc2274 | 26 | std::string get_message(); |
AlexVC97 | 2:e6a095fc2274 | 27 | std::string get_hint(); |
AlexVC97 | 2:e6a095fc2274 | 28 | bool get_deadline(); |
AlexVC97 | 2:e6a095fc2274 | 29 | int get_deadlineTime(); |
AlexVC97 | 2:e6a095fc2274 | 30 | double get_latitude(); |
AlexVC97 | 2:e6a095fc2274 | 31 | double get_longitude(); |
AlexVC97 | 2:e6a095fc2274 | 32 | int get_radius(); |
AlexVC97 | 2:e6a095fc2274 | 33 | |
AlexVC97 | 2:e6a095fc2274 | 34 | // method from_json |
AlexVC97 | 2:e6a095fc2274 | 35 | public: |
AlexVC97 | 2:e6a095fc2274 | 36 | void from_json(MbedJSONValue& json); |
AlexVC97 | 2:e6a095fc2274 | 37 | |
AlexVC97 | 2:e6a095fc2274 | 38 | // method to_string |
AlexVC97 | 2:e6a095fc2274 | 39 | public: |
AlexVC97 | 2:e6a095fc2274 | 40 | std::string to_string(); |
AlexVC97 | 2:e6a095fc2274 | 41 | }; |
AlexVC97 | 2:e6a095fc2274 | 42 | }; |