|
Revision 8699, 0.8 KB
(checked in by mcarrick, 4 years ago)
|
|
reducing ambiguity in member functions, cleaning up calls
|
| Line | |
|---|
| 1 | #include "PropertyFile.h" |
|---|
| 2 | |
|---|
| 3 | #include <iostream> |
|---|
| 4 | |
|---|
| 5 | #include "include/tinyxml.h" |
|---|
| 6 | |
|---|
| 7 | PropertyFile::PropertyFile(TiXmlElement *elem) |
|---|
| 8 | { |
|---|
| 9 | parseElement(elem); |
|---|
| 10 | } |
|---|
| 11 | |
|---|
| 12 | PropertyFile::~PropertyFile() |
|---|
| 13 | { |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | void PropertyFile::parseElement(TiXmlElement *elem) |
|---|
| 17 | { |
|---|
| 18 | std::cout << "DEBUG: parsing property file..." << std::endl; |
|---|
| 19 | |
|---|
| 20 | parseAttributes(elem); // get type from propertyfile tag |
|---|
| 21 | parseChildElements(elem); // parse localfile tag |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | void PropertyFile::parseAttributes(TiXmlElement *elem) |
|---|
| 25 | { |
|---|
| 26 | type = elem->Attribute("type"); |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | void PropertyFile::parseChildElements(TiXmlElement *elem) |
|---|
| 30 | { |
|---|
| 31 | TiXmlElement *local = elem->FirstChildElement("localfile"); |
|---|
| 32 | localfile = local->Attribute("name"); |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | std::string PropertyFile::getPropFileType() |
|---|
| 36 | { |
|---|
| 37 | return type; |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | std::string PropertyFile::getPropFileLocalFile() |
|---|
| 41 | { |
|---|
| 42 | return localfile; |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | |
|---|