HoverRace  2.0
TrackEntry.h
Go to the documentation of this file.
1 
2 // TrackEntry.h
3 //
4 // Copyright (c) 2010, 2014, 2015 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 #include "../Util/Inspectable.h"
25 #include "../Util/MR_Types.h"
26 #include "../Util/OS.h"
27 
28 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
29 # ifdef MR_ENGINE
30 # define MR_DllDeclare __declspec( dllexport )
31 # else
32 # define MR_DllDeclare __declspec( dllimport )
33 # endif
34 #else
35 # define MR_DllDeclare
36 #endif
37 
38 namespace HoverRace {
39  namespace Parcel {
40  class ObjStream;
41  }
42  namespace Util {
43  class InspectMapNode;
44  }
45 }
46 
47 namespace HoverRace {
48 namespace Model {
49 
55 {
57 
58 public:
59  TrackEntry() : SUPER() { }
60  virtual ~TrackEntry() { }
61 
62  void Serialize(Parcel::ObjStream &os);
63 
64  virtual void Inspect(Util::InspectMapNode &node) const;
65 
66  bool operator<(const TrackEntry &elem2) const
67  {
68  return name < elem2.name;
69  }
70 
71  bool operator==(const TrackEntry &elem2) const
72  {
73  return ((name == elem2.name) &&
74  (description == elem2.description));
75  }
76 
77 public:
83  std::string name;
84 
85 # ifdef _DEBUG
86  Util::OS::path_t path; // For parcel debugging.
87 # endif
88  std::string description;
93 };
94 
95 } // namespace Model
96 } // namespace HoverRace
97 
98 #undef MR_DllDeclare
MR_Int32 registrationMode
Definition: TrackEntry.h:91
TrackEntry()
Definition: TrackEntry.h:59
boost::filesystem::path path_t
Definition: OS.h:57
#define MR_DllDeclare
Definition: TrackEntry.h:35
An inspection node which maps field names to values (either strings or inspectable subobjects)...
Definition: InspectMapNode.h:88
MR_Int32 sortingIndex
Definition: TrackEntry.h:92
Definition: Inspectable.h:41
The metadata for a track.
Definition: TrackEntry.h:54
Base class for parcel serializers.
Definition: ObjStream.h:58
int32_t MR_Int32
Definition: MR_Types.h:43
MR_Int32 regMajor
Definition: TrackEntry.h:90
MR_Int32 regMinor
Definition: TrackEntry.h:89
std::string description
Definition: TrackEntry.h:88
std::string name
The name of the track.
Definition: TrackEntry.h:83
virtual ~TrackEntry()
Definition: TrackEntry.h:60
bool operator==(const TrackEntry &elem2) const
Definition: TrackEntry.h:71
bool operator<(const TrackEntry &elem2) const
Definition: TrackEntry.h:66
Definition: Announcement.h:24