|
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 | |
|---|
| 7 | DeviceClass::DeviceClass(TiXmlElement *elem) |
|---|
| 8 | { |
|---|
| 9 | parseElement(elem); |
|---|
| 10 | } |
|---|
| 11 | |
|---|
| 12 | DeviceClass::~DeviceClass() |
|---|
| 13 | { |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | void 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 | |
|---|
| 31 | std::vector <std::string> DeviceClass::getDeviceClass() |
|---|
| 32 | { |
|---|
| 33 | return deviceClass; |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | |
|---|