Tinman  1.0
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Track Class Reference

#include <track.h>

Public Types

typedef std::shared_ptr< Trackshared
 

Public Member Functions

 Track (std::string file)
 
void next (std::string file)
 
void next (Scene::shared scene, Physics::shared physics)
 
Section create_section (std::string name)
 
void reset ()
 

Public Attributes

std::vector< Sectionsegments_
 
int columns_
 

Private Member Functions

void open_file (std::string file)
 
Ogre::SceneNode * create_graphic_element (std::string name)
 
Section create_physic_element (std::string name, Ogre::SceneNode *graphic_element)
 
Section::Type get_section_type (std::string name)
 
void order_track ()
 
int get_next_section (int index, char direction)
 
char get_direction (Section::Type type, Section::Type previous, char last_direction)
 

Private Attributes

std::string file_name_
 
std::wifstream file_
 
std::map< wchar_t, std::function< Section()> > builder_
 
std::map< wchar_t, std::pair< char, char > > directions_
 
std::map< char, char > ends_
 
int x_
 
int z_
 
int index_
 
Scene::shared scene_
 
Physics::shared physics_
 
wchar_t current_char_
 

Member Typedef Documentation

typedef std::shared_ptr<Track> Track::shared

Constructor & Destructor Documentation

Track::Track ( std::string  file)

Member Function Documentation

Ogre::SceneNode * Track::create_graphic_element ( std::string  name)
private
Section Track::create_physic_element ( std::string  name,
Ogre::SceneNode *  graphic_element 
)
private
Section Track::create_section ( std::string  name)
char Track::get_direction ( Section::Type  type,
Section::Type  previous,
char  last_direction 
)
private
int Track::get_next_section ( int  index,
char  direction 
)
private
Section::Type Track::get_section_type ( std::string  name)
private
void Track::next ( std::string  file)
void Track::next ( Scene::shared  scene,
Physics::shared  physics 
)
void Track::open_file ( std::string  file)
private
void Track::order_track ( )
private
void Track::reset ( )

Member Data Documentation

std::map<wchar_t, std::function<Section()> > Track::builder_
private
int Track::columns_
wchar_t Track::current_char_
private
std::map<wchar_t, std::pair<char, char> > Track::directions_
private
std::map<char, char> Track::ends_
private
std::wifstream Track::file_
private
std::string Track::file_name_
private
int Track::index_
private
Physics::shared Track::physics_
private
Scene::shared Track::scene_
private
std::vector<Section> Track::segments_
int Track::x_
private
int Track::z_
private

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