lab_memory
Malevolent Memories
fileio.cpp File Reference
#include "fileio.h"
+ Include dependency graph for fileio.cpp:

Namespaces

 fileio
 Utility functions for reading students/rooms from files.
 
 fileio::fileio_internal
 Holds variables that only need to be accessed by the namespace itself.
 

Functions

void fileio::init ()
 Sets up the students and rooms variables as empty vectors. More...
 
void fileio::halt ()
 Acts as a destructor for the fileio reader. More...
 
void fileio::loadStudents (const string &file)
 Reads the student file into the students vector. More...
 
void fileio::loadRooms (const string &file)
 Reads the rooms file into the rooms vector. More...
 
int fileio::getNumStudents ()
 
int fileio::getNumRooms ()
 
bool fileio::areMoreStudents ()
 
bool fileio::areMoreRooms ()
 
string fileio::nextStudent ()
 
Room fileio::nextRoom ()
 
Room fileio::readRoom (const string &line)
 Reads a line parsed from the rooms file into a list of rooms. More...
 
vector< stringfileio::tokenize (const string &str, char delim)
 Tokenizes a string of delimiter-separated elements. More...
 
void fileio::readFile (const string &file, vector< string > &lines)
 Reads a file into a vector of lines. More...
 
void fileio::readFileGeneric (const string &filename, FileMap *map, vector< string > *lines)
 

Variables

vector< string > * fileio::fileio_internal::students = NULL
 A vector of students that were read from the file. More...
 
vector< string > * fileio::fileio_internal::rooms = NULL
 A vector of Rooms that were read from the file. More...
 
size_t fileio::fileio_internal::students_i
 Represents the index of the student to read next. More...
 
size_t fileio::fileio_internal::rooms_i
 Represents the index of the Room to read next. More...