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

Revision 8699, 0.7 KB (checked in by mcarrick, 4 years ago)

reducing ambiguity in member functions, cleaning up calls

Line 
1#include "DeviceClass.h"
2
3#include <iostream>
4
5#include "include/tinyxml.h"
6
7DeviceClass::DeviceClass(TiXmlElement *elem)
8{
9        parseElement(elem);
10}
11
12DeviceClass::~DeviceClass()
13{
14}
15
16void DeviceClass::parseElement(TiXmlElement *elem)
17{
18        std::cout << "DEBUG: parsing device class..." << std::endl;
19
20        TiXmlElement *classType = elem->FirstChildElement("class"); // set link to class tags
21       
22        // there may be one or more class tags, loop through and append them all
23        for (; classType; classType = classType->NextSiblingElement("class"))
24        {
25                deviceClass.push_back(classType->GetText());
26        }
27
28
29}
30
31std::vector <std::string> DeviceClass::getDeviceClass()
32{
33        return deviceClass;
34}
35
36
Note: See TracBrowser for help on using the browser.