lab_memory
Malevolent Memories
fileio.h File Reference
#include <algorithm>
#include <iostream>
#include <fstream>
#include <map>
#include <sstream>
#include <string>
#include <vector>
#include "room.h"
+ Include dependency graph for fileio.h:
+ This graph shows which files directly or indirectly include this file:

Namespaces

 fileio
 Utility functions for reading students/rooms from files.
 

Typedefs

typedef map< string, vector
< string > > 
fileio::FileMap
 Stores config name options if necessary. More...
 

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)