Debian Codegraph @

src/game/trackdata.hpp

raw symbols SCIP
1 // This file is part of Dust Racing 2D.
2 // Copyright (C) 2011 Jussi Lind <[email protected]>
3 //
4 // Dust Racing 2D is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 // Dust Racing 2D is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with Dust Racing 2D. If not, see <http://www.gnu.org/licenses/>.
15
16 #ifndef TRACKDATA_HPP
17 #define TRACKDATA_HPP
18
19 #include <QString>
20
21 #include "../common/mapbase.hpp"
22 #include "../common/objects.hpp"
23 #include "../common/route.hpp"
24 #include "../common/trackdatabase.hpp"
25
26 #include "map.hpp"
27
28 class TrackData : public TrackDataBase
29 {
30 public:
31 //! Constructor.
32 TrackData(QString name, bool isUserTrack, unsigned int cols, unsigned int rows);
33
34 //! Destructor.
35 virtual ~TrackData();
36
37 //! Get file name.
38 QString fileName() const;
39
40 //! Set file name.
41 void setFileName(QString fileName);
42
43 //! Get map object.
44 MapBase & map();
45
46 //! Get map object.
47 const MapBase & map() const;
48
49 //! Get route object.
50 Route & route();
51
52 //! Get route object.
53 const Route & route() const;
54
55 //! Get objects object.
56 Objects & objects();
57
58 //! Get objects object.
59 const Objects & objects() const;
60
61 //! Return true if the track is locked.
62 bool isLocked() const;
63
64 //! Set the locked state.
65 void setIsLocked(bool locked);
66
67 private:
68 QString m_fileName;
69 Map m_map;
70 Objects m_objects;
71 Route m_route;
72 bool m_isLocked;
73 };
74
75 #endif // TRACKDATA_HPP