root/ossiedev/branches/mcarrick/DPD/PropertyFile.cpp @ 8699

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
7PropertyFile::PropertyFile(TiXmlElement *elem)
8{
9        parseElement(elem);
10}
11
12PropertyFile::~PropertyFile()
13{
14}
15
16void 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
24void PropertyFile::parseAttributes(TiXmlElement *elem)
25{
26        type = elem->Attribute("type");
27}
28
29void PropertyFile::parseChildElements(TiXmlElement *elem)
30{
31        TiXmlElement *local = elem->FirstChildElement("localfile");
32        localfile = local->Attribute("name");
33}
34
35std::string PropertyFile::getPropFileType()
36{
37        return type;
38}
39
40std::string PropertyFile::getPropFileLocalFile()
41{
42        return localfile;
43}
44
45
Note: See TracBrowser for help on using the browser.