Changeset 8703
- Timestamp:
- 02/16/09 17:49:26 (4 years ago)
- Location:
- ossiedev/branches/mcarrick/DPD
- Files:
-
- 2 removed
- 6 modified
-
DevicePkgRef.cpp (modified) (2 diffs)
-
DevicePkgRef.h (modified) (1 diff)
-
HWDeviceRegistration.cpp (modified) (4 diffs)
-
HWDeviceRegistration.h (modified) (2 diffs)
-
LocalFile.cpp (deleted)
-
LocalFile.h (deleted)
-
Makefile (modified) (2 diffs)
-
testApp.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/branches/mcarrick/DPD/DevicePkgRef.cpp
r8691 r8703 12 12 DevicePkgRef::~DevicePkgRef() 13 13 { 14 std::cout << "dev pkg ref deconstruct ... " << std::endl;15 14 } 16 15 … … 19 18 std::cout << "DEBUG: parsing device pkg ref..." << std::endl; 20 19 21 type = elem->Attribute("type"); // store type from devicepkgref tag 20 parseAttributes(elem); // store type from devicepkgref tag 21 parseChildElements(elem); 22 22 23 TiXmlElement *local = elem->FirstChildElement("localfile"); // get link to localfile tag24 localfile = local->Attribute("name"); // store path25 23 } 26 24 27 std::string DevicePkgRef::getTypeDevPkgRef() 25 void DevicePkgRef::parseAttributes(TiXmlElement *elem) 26 { 27 type = elem->Attribute("type"); 28 } 29 30 void DevicePkgRef::parseChildElements(TiXmlElement *elem) 31 { 32 TiXmlElement *local = elem->FirstChildElement("localfile"); 33 localfile = local->Attribute("name"); 34 } 35 36 std::string DevicePkgRef::getDevPkgRefType() 28 37 { 29 38 return type; 30 39 } 31 40 32 std::string DevicePkgRef::get LocalFileDevPkgRef()41 std::string DevicePkgRef::getDevPkgRefLocalFile() 33 42 { 34 43 return localfile; -
ossiedev/branches/mcarrick/DPD/DevicePkgRef.h
r8685 r8703 16 16 ~DevicePkgRef(); 17 17 18 std::string get TypeDevPkgRef();19 std::string get LocalFileDevPkgRef();18 std::string getDevPkgRefType(); 19 std::string getDevPkgRefLocalFile(); 20 20 21 21 protected: 22 22 void parseElement(TiXmlElement *elem); 23 void parseAttributes(TiXmlElement *elem); 24 void parseChildElements(TiXmlElement *elem); 23 25 24 26 private: -
ossiedev/branches/mcarrick/DPD/HWDeviceRegistration.cpp
r8699 r8703 11 11 { 12 12 parseElement(elem); // parse tags in hwdeviceregistration, with exception of propertyfile, deviceclass, childhwdevice 13 constructChildHWDevice(elem->FirstChildElement("childhwdevice")); // cannot call constructor on ChildHWDevice, use this function to do it13 constructChildHWDevice(elem->FirstChildElement("childhwdevice")); 14 14 } 15 15 … … 55 55 ChildHWDevice::ChildHWDevice(TiXmlElement *elem):DevicePkgRef(elem->FirstChildElement("devicepkgref")) 56 56 { 57 HWDeviceRegistration hwdev(elem->FirstChildElement("hwdeviceregistration")); 57 58 } 58 59 … … 96 97 } 97 98 99 /* 100 HWDeviceRegistration ChildHWDevice::getHWDeviceRegistration() 101 { 102 return hwDeviceReg; 103 } 104 */ 98 105 99 106 … … 101 108 102 109 103 104 -
ossiedev/branches/mcarrick/DPD/HWDeviceRegistration.h
r8699 r8703 51 51 }; 52 52 53 // class OSSIEPARSER_API ChildHWDevice:public DevicePkgRef 53 54 class ChildHWDevice:public DevicePkgRef 54 55 { … … 57 58 ~ChildHWDevice(); 58 59 59 HWDeviceRegistration getHWDeviceRegistration();60 // HWDeviceRegistration getHWDeviceRegistration(); 60 61 61 62 protected: -
ossiedev/branches/mcarrick/DPD/Makefile
r8679 r8703 1 1 all: testApp 2 2 3 testApp: DevicePkg.o testApp.o LocalFile.oHWDeviceRegistration.o PropertyFile.o DevicePkgRef.o DeviceClass.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o4 g++ DevicePkg.o LocalFile.oHWDeviceRegistration.o PropertyFile.o DevicePkgRef.o DeviceClass.o testApp.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o -o testApp3 testApp: DevicePkg.o testApp.o HWDeviceRegistration.o PropertyFile.o DevicePkgRef.o DeviceClass.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o 4 g++ DevicePkg.o HWDeviceRegistration.o PropertyFile.o DevicePkgRef.o DeviceClass.o testApp.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o -o testApp 5 5 6 6 … … 29 29 g++ -c HWDeviceRegistration.cpp 30 30 31 LocalFile.o: LocalFile.cpp32 g++ -c LocalFile.cpp33 34 31 PropertyFile.o: PropertyFile.cpp 35 32 g++ -c PropertyFile.cpp -
ossiedev/branches/mcarrick/DPD/testApp.cpp
r8699 r8703 63 63 } 64 64 std::cout << " </deviceclass>" << std::endl; 65 66 for (int i = 0; i < parse.getChildHWDevice().size(); i++) 67 { 68 std::cout << " <childhwdevice>" << std::endl; 69 // std::cout << " <hwdeviceregistration id=" << parse.getChildHWDevice()[i]->getHWDeviceRegistration().getHWDevRegID() << std::endl; 70 } 71 72 65 73 66 74 … … 134 142 135 143 DevicePkgRef parse(devPkgRef); 136 137 std::cout << "********************" << std::endl;138 std::cout << "DevicePkgRef:" << std::endl;139 std::cout << "type: " << parse.getTypeDevPkgRef() << std::endl;140 std::cout << "localfile: " << parse.getLocalFileDevPkgRef() << std::endl;141 std::cout << "********************" << std::endl;142 143 144 } 144 145 else