Changeset 8703

Show
Ignore:
Timestamp:
02/16/09 17:49:26 (4 years ago)
Author:
mcarrick
Message:

removing ambiguitity in members, cleaning up function calls

Location:
ossiedev/branches/mcarrick/DPD
Files:
2 removed
6 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/branches/mcarrick/DPD/DevicePkgRef.cpp

    r8691 r8703  
    1212DevicePkgRef::~DevicePkgRef() 
    1313{ 
    14         std::cout << "dev pkg ref deconstruct ... " << std::endl; 
    1514} 
    1615 
     
    1918        std::cout << "DEBUG: parsing device pkg ref..." << std::endl; 
    2019 
    21         type = elem->Attribute("type"); // store type from devicepkgref tag 
     20        parseAttributes(elem); // store type from devicepkgref tag 
     21        parseChildElements(elem); 
    2222 
    23         TiXmlElement *local = elem->FirstChildElement("localfile"); // get link to localfile tag 
    24         localfile = local->Attribute("name"); // store path 
    2523} 
    2624 
    27 std::string DevicePkgRef::getTypeDevPkgRef() 
     25void DevicePkgRef::parseAttributes(TiXmlElement *elem) 
     26{ 
     27        type = elem->Attribute("type"); 
     28} 
     29 
     30void DevicePkgRef::parseChildElements(TiXmlElement *elem) 
     31{ 
     32        TiXmlElement *local = elem->FirstChildElement("localfile"); 
     33        localfile = local->Attribute("name"); 
     34} 
     35 
     36std::string DevicePkgRef::getDevPkgRefType() 
    2837{ 
    2938        return type; 
    3039} 
    3140 
    32 std::string DevicePkgRef::getLocalFileDevPkgRef() 
     41std::string DevicePkgRef::getDevPkgRefLocalFile() 
    3342{ 
    3443        return localfile; 
  • ossiedev/branches/mcarrick/DPD/DevicePkgRef.h

    r8685 r8703  
    1616                ~DevicePkgRef(); 
    1717 
    18                 std::string getTypeDevPkgRef(); 
    19                 std::string getLocalFileDevPkgRef(); 
     18                std::string getDevPkgRefType(); 
     19                std::string getDevPkgRefLocalFile(); 
    2020 
    2121        protected: 
    2222                void parseElement(TiXmlElement *elem); 
     23                void parseAttributes(TiXmlElement *elem); 
     24                void parseChildElements(TiXmlElement *elem); 
    2325 
    2426        private: 
  • ossiedev/branches/mcarrick/DPD/HWDeviceRegistration.cpp

    r8699 r8703  
    1111{ 
    1212        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 it 
     13        constructChildHWDevice(elem->FirstChildElement("childhwdevice"));  
    1414} 
    1515 
     
    5555ChildHWDevice::ChildHWDevice(TiXmlElement *elem):DevicePkgRef(elem->FirstChildElement("devicepkgref")) 
    5656{ 
     57        HWDeviceRegistration hwdev(elem->FirstChildElement("hwdeviceregistration")); 
    5758} 
    5859 
     
    9697} 
    9798 
     99/* 
     100HWDeviceRegistration ChildHWDevice::getHWDeviceRegistration() 
     101{ 
     102        return hwDeviceReg; 
     103} 
     104*/ 
    98105 
    99106 
     
    101108 
    102109 
    103  
    104  
  • ossiedev/branches/mcarrick/DPD/HWDeviceRegistration.h

    r8699 r8703  
    5151}; 
    5252 
     53// class OSSIEPARSER_API ChildHWDevice:public DevicePkgRef 
    5354class ChildHWDevice:public DevicePkgRef 
    5455{ 
     
    5758                ~ChildHWDevice(); 
    5859 
    59                 HWDeviceRegistration getHWDeviceRegistration(); 
     60        //      HWDeviceRegistration getHWDeviceRegistration(); 
    6061 
    6162        protected: 
  • ossiedev/branches/mcarrick/DPD/Makefile

    r8679 r8703  
    11all: testApp 
    22 
    3 testApp: DevicePkg.o testApp.o LocalFile.o HWDeviceRegistration.o PropertyFile.o DevicePkgRef.o DeviceClass.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o 
    4         g++ DevicePkg.o LocalFile.o HWDeviceRegistration.o PropertyFile.o DevicePkgRef.o DeviceClass.o testApp.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o -o testApp 
     3testApp: 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 
    55 
    66 
     
    2929        g++ -c HWDeviceRegistration.cpp 
    3030 
    31 LocalFile.o: LocalFile.cpp 
    32         g++ -c LocalFile.cpp 
    33  
    3431PropertyFile.o: PropertyFile.cpp 
    3532        g++ -c PropertyFile.cpp 
  • ossiedev/branches/mcarrick/DPD/testApp.cpp

    r8699 r8703  
    6363                } 
    6464                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 
    6573 
    6674 
     
    134142 
    135143                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  
    143144        } 
    144145        else