HoverRace  2.0
Public Member Functions | Private Attributes | List of all members
HoverRace::Client::Rules Class Reference

The options and settings for a single game session. More...

#include <Rules.h>

Public Member Functions

 Rules (std::shared_ptr< const Rulebook > rulebook=std::shared_ptr< const Rulebook >())
 
const Model::GameOptionsGetGameOpts () const
 
int GetLaps () const
 
std::shared_ptr< const RulebookGetRulebook () const
 
luabind::object & GetRules ()
 Retrieve the the Lua view of the rules. More...
 
std::shared_ptr< const Model::TrackEntryGetTrackEntry () const
 
void SetGameOpts (const Model::GameOptions &gameOpts)
 
void SetLaps (int laps)
 
void SetRulebook (std::shared_ptr< const Rulebook > rulebook)
 Set the rulebook and reset the rules to their defaults. More...
 
void SetTrackEntry (std::shared_ptr< const Model::TrackEntry > trackEntry)
 

Private Attributes

Model::GameOptions gameOpts
 
std::shared_ptr< const Rulebookrulebook
 
luabind::object rules
 
std::shared_ptr< const Model::TrackEntrytrackEntry
 

Detailed Description

The options and settings for a single game session.

Author
Michael Imamura

Constructor & Destructor Documentation

HoverRace::Client::Rules::Rules ( std::shared_ptr< const Rulebook rulebook = std::shared_ptr<const Rulebook>())

Member Function Documentation

const Model::GameOptions& HoverRace::Client::Rules::GetGameOpts ( ) const
inline
int HoverRace::Client::Rules::GetLaps ( ) const
inline
std::shared_ptr<const Rulebook> HoverRace::Client::Rules::GetRulebook ( ) const
inline
luabind::object& HoverRace::Client::Rules::GetRules ( )
inline

Retrieve the the Lua view of the rules.

std::shared_ptr<const Model::TrackEntry> HoverRace::Client::Rules::GetTrackEntry ( ) const
inline
void HoverRace::Client::Rules::SetGameOpts ( const Model::GameOptions gameOpts)
inline
void HoverRace::Client::Rules::SetLaps ( int  laps)
inline
void HoverRace::Client::Rules::SetRulebook ( std::shared_ptr< const Rulebook rulebook)

Set the rulebook and reset the rules to their defaults.

Parameters
rulebookThe rulebook (may be nullptr).
void HoverRace::Client::Rules::SetTrackEntry ( std::shared_ptr< const Model::TrackEntry trackEntry)
inline

Member Data Documentation

Model::GameOptions HoverRace::Client::Rules::gameOpts
private
std::shared_ptr<const Rulebook> HoverRace::Client::Rules::rulebook
private
luabind::object HoverRace::Client::Rules::rules
private
std::shared_ptr<const Model::TrackEntry> HoverRace::Client::Rules::trackEntry
private

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