port/mars-tycoon
Last change
on this file since 25c4774 was aad5afa, checked in by Jonathan Neufeld <support@…>, 3 years ago |
Fix YAML provider bugs preventing YAML configurations from loading properly.
|
-
Property mode
set to
100755
|
File size:
1.1 KB
|
Rev | Line | |
---|
[80a6a52] | 1 | #ifndef __YAMLGEOMORPHFACTORYCONFIGREADER_H__
|
---|
| 2 | #define __YAMLGEOMORPHFACTORYCONFIGREADER_H__
|
---|
| 3 |
|
---|
| 4 | #include <map>
|
---|
| 5 | #include <vector>
|
---|
| 6 | #include <fstream>
|
---|
| 7 | #include <yaml.h>
|
---|
| 8 |
|
---|
| 9 | #include <mars_platform.h>
|
---|
| 10 |
|
---|
| 11 | #include <gwconfig.h>
|
---|
| 12 |
|
---|
| 13 | namespace genesis
|
---|
| 14 | {
|
---|
| 15 | class DL_EXPORT YAMLGeoMorphConfigReader : public geoworld::IFactoryConfigReader
|
---|
| 16 | {
|
---|
| 17 | protected:
|
---|
| 18 |
|
---|
| 19 | typedef std::vector< geoworld::IConfigFactoryBase * > FactoryVector;
|
---|
| 20 | typedef std::vector< YAML::Node > NodeVector;
|
---|
| 21 |
|
---|
| 22 | private:
|
---|
| 23 | FactoryVector * _pList;
|
---|
[aad5afa] | 24 | NodeVector _docs;
|
---|
| 25 | NodeVector::const_iterator _i;
|
---|
[80a6a52] | 26 |
|
---|
| 27 | class InvalidPhaseName : public std::exception {};
|
---|
| 28 |
|
---|
| 29 | geoworld::GeoTemplatePhase getPhaseFor (const std::string & sPhase);
|
---|
| 30 |
|
---|
| 31 | geoworld::IConfigGMFactory * readGMFactory (const std::string & sName, const std::string & sAlias, const YAML::Node * pndConfigSection);
|
---|
| 32 | geoworld::IConfigGTFactory * readGTFactory(const std::string & sName, const std::string & sAlias, const YAML::Node * pndConfigSection);
|
---|
| 33 |
|
---|
| 34 | public:
|
---|
| 35 | YAMLGeoMorphConfigReader(std::istream & input);
|
---|
| 36 | ~YAMLGeoMorphConfigReader();
|
---|
| 37 |
|
---|
| 38 | virtual geoworld::IConfigFactoryBase * readNext();
|
---|
| 39 | };
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.