Revision 3220,
982 bytes
checked in by mattausch, 16 years ago
(diff) |
worked on video replay function
|
Rev | Line | |
---|
[2825] | 1 | #ifndef __Environment_H__
|
---|
| 2 | #define __Environment_H__
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | #include <string>
|
---|
| 6 | #include <iostream>
|
---|
| 7 | #include <fstream>
|
---|
[2828] | 8 | #include <map>
|
---|
[2825] | 9 |
|
---|
| 10 | #include "common.h"
|
---|
| 11 | #include "Vector3.h"
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | namespace CHCDemoEngine
|
---|
| 15 | {
|
---|
| 16 |
|
---|
| 17 | /** Loads startup environment for the demo
|
---|
[3220] | 18 | Options are stored as name / value pair
|
---|
[2825] | 19 | */
|
---|
| 20 | class Environment
|
---|
| 21 | {
|
---|
| 22 | public:
|
---|
| 23 |
|
---|
| 24 | /** Reads the environment
|
---|
| 25 | */
|
---|
| 26 | bool Read(const std::string &filename);
|
---|
| 27 |
|
---|
[3220] | 28 | bool GetFloatParam(std::string &name, float &val) const;
|
---|
| 29 | bool GetIntParam(std::string &name, int &val) const;
|
---|
| 30 | bool GetVectorParam(std::string &name, Vector3 &val) const;
|
---|
| 31 | bool GetBoolParam(std::string &name, bool &val) const;
|
---|
| 32 | bool GetStringParam(std::string &name, std::string &val) const;
|
---|
[2826] | 33 |
|
---|
[3220] | 34 |
|
---|
[2828] | 35 | protected:
|
---|
[2825] | 36 |
|
---|
[2828] | 37 | /** Parse this string, return tokens separated by given delimiters
|
---|
| 38 | */
|
---|
| 39 | void Tokenize(const std::string& str, std::vector<std::string> &tokens, const std::string &delim = " ") const;
|
---|
[2825] | 40 |
|
---|
[2828] | 41 | std::map<std::string, std::string> mParams;
|
---|
[2825] | 42 | };
|
---|
| 43 |
|
---|
| 44 | }
|
---|
| 45 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.