/[anoncvs]/projects/roguelike/DataFile.h


UCC Code Repository

Contents of /projects/roguelike/DataFile.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Mon Apr 10 01:55:34 2006 UTC (15 years, 1 month ago) by banana
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +4 -0 lines
File MIME type: text/plain
Made DataFile work in a more generic way, changed World argument order to support that

1 /*
2 * DataFile - Loads and models files
3 */
4 #pragma once
5
6 //Includes
7 #include <vector>
8 #include <string>
9 #include "Terrain.h"
10 #include "World.h"
11
12 //Class definition
13 class DataFile {
14 std::vector<std::wstring> lines;
15
16 bool parseBool(int);
17 unsigned int parseHex(int);
18 wchar_t parseChar(int);
19 std::wstring parseString(int);
20 int parseGridRows(int);
21 int parseGridColumns(int);
22
23 public:
24 DataFile(std::string category, int id);
25
26 //Get raw data
27 std::wstring operator[](int line);
28
29 //Get interpreted data
30 Terrain *asTerrain();
31 World *asWorld();
32 };

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26