HoverRace
2.0
|
A source of track parcels. More...
#include <TrackBundle.h>
Public Member Functions | |
TrackBundle (const Util::OS::path_t &dir, std::shared_ptr< Bundle > subBundle=std::shared_ptr< Bundle >()) | |
virtual | ~TrackBundle () |
MR_TrackAvail | CheckAvail (const std::string &name) const |
Check if a track is available. More... | |
std::shared_ptr< Display::Res< Display::Texture > > | LoadMap (std::shared_ptr< const Model::TrackEntry > entry) const |
std::shared_ptr< RecordFile > | OpenParcel (const std::string &name, bool writing=false) const override |
Open an existing parcel. More... | |
std::shared_ptr< Model::Track > | OpenTrack (const std::string &name) const |
Load a track by name. More... | |
std::shared_ptr< Model::Track > | OpenTrack (const std::shared_ptr< const Model::TrackEntry > &entry) const |
Load a track by track header. More... | |
std::shared_ptr< Model::TrackEntry > | OpenTrackEntry (const std::string &name) const |
Load a track header. More... | |
![]() | |
Bundle (const Util::OS::path_t &dir, std::shared_ptr< Bundle > subBundle=std::shared_ptr< Bundle >()) | |
Constructor. More... | |
virtual | ~Bundle () |
iterator | begin () |
const_iterator | begin () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
iterator | end () |
const_iterator | end () const |
Private Types | |
using | SUPER = Bundle |
Additional Inherited Members | |
![]() | |
using | const_iterator = Iterator |
using | iterator = Iterator |
using | value_type = Util::OS::dirEnt_t |
A source of track parcels.
|
private |
HoverRace::Parcel::TrackBundle::TrackBundle | ( | const Util::OS::path_t & | dir, |
std::shared_ptr< Bundle > | subBundle = std::shared_ptr<Bundle>() |
||
) |
|
inlinevirtual |
MR_TrackAvail HoverRace::Parcel::TrackBundle::CheckAvail | ( | const std::string & | name | ) | const |
Check if a track is available.
name | The name of the track. The ".trk" suffix may be omitted. |
eTrackAvail
if the track is available, eTrackNotFound
otherwise. std::shared_ptr< Display::Res< Display::Texture > > HoverRace::Parcel::TrackBundle::LoadMap | ( | std::shared_ptr< const Model::TrackEntry > | entry | ) | const |
|
overridevirtual |
Open an existing parcel.
All parcels, including sub-bundles, will be searched.
name | The name of the parcel. |
writing | true if the parcel will be written to, false if read-only. |
nullptr
if parcel does not exist). Reimplemented from HoverRace::Parcel::Bundle.
std::shared_ptr< Model::Track > HoverRace::Parcel::TrackBundle::OpenTrack | ( | const std::string & | name | ) | const |
Load a track by name.
name | The name of the track. The ".trk" suffix may be omitted. |
nullptr
if the track does not exist. ObjStreamExn | The track failed to load. |
std::shared_ptr< Model::Track > HoverRace::Parcel::TrackBundle::OpenTrack | ( | const std::shared_ptr< const Model::TrackEntry > & | entry | ) | const |
Load a track by track header.
entry | The entry for the track (may not be nullptr , see OpenTrackEntry()). |
nullptr
if the track does not exist. ObjStreamExn | The track failed to load. |
std::shared_ptr< Model::TrackEntry > HoverRace::Parcel::TrackBundle::OpenTrackEntry | ( | const std::string & | name | ) | const |
Load a track header.
name | The name of the track. The ".trk" suffix may be omitted. |
nullptr
if the track does not exist. ObjStreamExn | The track failed to load. |