HoverRace  2.0
Classes | Public Types | Public Member Functions | Private Attributes | Static Private Attributes | List of all members
HoverRace::Parcel::Bundle Class Reference

A source of parcels. More...

#include <Bundle.h>

+ Inheritance diagram for HoverRace::Parcel::Bundle:

Classes

class  Iterator
 

Public Types

using const_iterator = Iterator
 
using iterator = Iterator
 
using value_type = Util::OS::dirEnt_t
 

Public Member Functions

 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
 
virtual std::shared_ptr< RecordFileOpenParcel (const std::string &name, bool writing=false) const
 Open an existing parcel. More...
 

Private Attributes

Util::OS::path_t dir
 
std::shared_ptr< BundlesubBundle
 

Static Private Attributes

static const iterator END
 

Detailed Description

A source of parcels.

Author
Michael Imamura

Member Typedef Documentation

Constructor & Destructor Documentation

HoverRace::Parcel::Bundle::Bundle ( const Util::OS::path_t dir,
std::shared_ptr< Bundle subBundle = std::shared_ptr<Bundle>() 
)

Constructor.

Parameters
dirThe directory (does not need to exist).
subBundleOptional fall-back bundle.
virtual HoverRace::Parcel::Bundle::~Bundle ( )
inlinevirtual

Member Function Documentation

iterator HoverRace::Parcel::Bundle::begin ( )
inline
const_iterator HoverRace::Parcel::Bundle::begin ( ) const
inline
const_iterator HoverRace::Parcel::Bundle::cbegin ( ) const
inline
const_iterator HoverRace::Parcel::Bundle::cend ( ) const
inline
iterator HoverRace::Parcel::Bundle::end ( )
inline
const_iterator HoverRace::Parcel::Bundle::end ( ) const
inline
std::shared_ptr< RecordFile > HoverRace::Parcel::Bundle::OpenParcel ( const std::string &  name,
bool  writing = false 
) const
virtual

Open an existing parcel.

All parcels, including sub-bundles, will be searched.

Parameters
nameThe name of the parcel.
writingtrue if the parcel will be written to, false if read-only.
Returns
The parcel (may be nullptr if parcel does not exist).

Reimplemented in HoverRace::Parcel::TrackBundle.

Member Data Documentation

Util::OS::path_t HoverRace::Parcel::Bundle::dir
private
const Bundle::iterator HoverRace::Parcel::Bundle::END
staticprivate
std::shared_ptr<Bundle> HoverRace::Parcel::Bundle::subBundle
private

The documentation for this class was generated from the following files: