Changeset 3598

Show
Ignore:
Timestamp:
05/02/07 14:26:45 (6 years ago)
Author:
balister
Message:

Can find and parse SPD file again.

Location:
ossie/trunk/ossie
Files:
2 added
4 modified

Legend:

Unmodified
Added
Removed
  • ossie/trunk/ossie/include/ossie/Makefile.am

    r3366 r3598  
    1 pkginclude_HEADERS = ApplicationFactory_impl.h LoadableDevice_impl.h Application_impl.h orb_wrap.h automaticTest.h OS_config.h ComponentAssemblyParser.h ossiecf.h ComponentInstantiation.h ossieparser.h ComponentPlacement.h Port.h ComponentSupportedInterface.h Port_impl.h Connection.h PortSupplier_impl.h DCDComponentInstantiation.h PRFParser.h PRFProperty.h DCDComponentPlacement.h PRFSimpleProperty.h PRFSimpleSequenceProperty.h DCDConnectionParser.h PropertySet_impl.h DCDInstantiationProperty.h ProvidesPort.h DCDParser.h Resource_impl.h Device_impl.h SADComponentInstantiation.h DeviceManager_impl.h SADComponentPlacement.h DMDParser.h SADHostCollocation.h DomainManager_impl.h SADParser.h ExecutableDevice_impl.h SCDParser.h ExternalPort.h SPDAuthor.h File_impl.h SPDImplementation.h FileManager_impl.h SPDParser.h FileSystem_impl.h SPDUsesDevice.h FindBy.h InstantiationProperty.h TestableObject_impl.h LifeCycle_impl.h UsesPort.h ossieSupport.h portability.h prop_helpers.h debug.h 
     1pkginclude_HEADERS = ApplicationFactory_impl.h LoadableDevice_impl.h Application_impl.h orb_wrap.h automaticTest.h OS_config.h ComponentAssemblyParser.h ossiecf.h ComponentInstantiation.h ossieparser.h ComponentPlacement.h Port.h ComponentSupportedInterface.h Port_impl.h Connection.h PortSupplier_impl.h DCDComponentInstantiation.h PRFParser.h PRFProperty.h DCDComponentPlacement.h PRFSimpleProperty.h PRFSimpleSequenceProperty.h DCDConnectionParser.h PropertySet_impl.h DCDInstantiationProperty.h ProvidesPort.h DCDParser.h Resource_impl.h Device_impl.h SADComponentInstantiation.h DeviceManager_impl.h SADComponentPlacement.h DMDParser.h SADHostCollocation.h DomainManager_impl.h SADParser.h ExecutableDevice_impl.h SCDParser.h ExternalPort.h SPDAuthor.h File_impl.h SPDImplementation.h FileManager_impl.h SPDParser.h FileSystem_impl.h SPDUsesDevice.h FindBy.h InstantiationProperty.h TestableObject_impl.h LifeCycle_impl.h UsesPort.h ossieSupport.h portability.h prop_helpers.h debug.h SADComponentFile.h 
    22 
  • ossie/trunk/ossie/include/ossie/SADParser.h

    r3593 r3598  
    3232#include "ossie/ComponentAssemblyParser.h" 
    3333#include "ossie/SADComponentPlacement.h" 
     34#include "ossie/SADComponentFile.h" 
    3435#include "ossie/SADHostCollocation.h" 
    3536#include "ossie/ExternalPort.h" 
     
    5455    SADComponentInstantiation* assemblyControllerInstantiation; 
    5556    std::vector <SADComponentPlacement*> components; 
     57    std::vector <SADComponentFile*> componentFiles; 
    5658    std::vector <SADHostCollocation*> hostCollocations; 
    5759    std::vector <ExternalPort*> externalPorts; 
    5860 
    5961    void parseFile(TiXmlHandle docHandle); 
     62    void parseComponentFiles(TiXmlHandle docHandle); 
    6063    void parseComponents(TiXmlHandle docHandle); 
    6164    void parseHostCollocation(TiXmlHandle docHandle); 
  • ossie/trunk/ossie/parser/Makefile.am

    r3366 r3598  
    11lib_LTLIBRARIES = libossieparser.la 
    2 libossieparser_la_SOURCES = ComponentAssemblyParser.cpp  Port.cpp ComponentInstantiation.cpp PRFParser.cpp ComponentPlacement.cpp PRFProperty.cpp PRFSimpleProperty.cpp PRFSimpleSequenceProperty.cpp ComponentSupportedInterface.cpp  ProvidesPort.cpp Connection.cpp SADComponentInstantiation.cpp DCDComponentInstantiation.cpp SADComponentPlacement.cpp DCDComponentPlacement.cpp SADHostCollocation.cpp DCDConnectionParser.cpp SADParser.cpp DCDInstantiationProperty.cpp SCDParser.cpp DCDParser.cpp SPDAuthor.cpp DMDParser.cpp SPDImplementation.cpp ExternalPort.cpp SPDParser.cpp FindBy.cpp SPDUsesDevice.cpp InstantiationProperty.cpp orb_wrap.cpp UsesPort.cpp ORB.cpp EventChannelSupport.cpp prop_helpers.cpp tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp 
     2libossieparser_la_SOURCES = ComponentAssemblyParser.cpp  Port.cpp ComponentInstantiation.cpp PRFParser.cpp ComponentPlacement.cpp PRFProperty.cpp PRFSimpleProperty.cpp PRFSimpleSequenceProperty.cpp ComponentSupportedInterface.cpp  ProvidesPort.cpp Connection.cpp SADComponentInstantiation.cpp DCDComponentInstantiation.cpp SADComponentPlacement.cpp DCDComponentPlacement.cpp SADHostCollocation.cpp DCDConnectionParser.cpp SADParser.cpp DCDInstantiationProperty.cpp SCDParser.cpp DCDParser.cpp SPDAuthor.cpp DMDParser.cpp SPDImplementation.cpp ExternalPort.cpp SPDParser.cpp FindBy.cpp SPDUsesDevice.cpp InstantiationProperty.cpp orb_wrap.cpp UsesPort.cpp ORB.cpp EventChannelSupport.cpp prop_helpers.cpp tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp SADComponentFile.cpp 
    33 
    44pkginclude_HEADERS = tinystr.h tinyxml.h 
  • ossie/trunk/ossie/parser/SADParser.cpp

    r3593 r3598  
    6464{ 
    6565 
     66    parseComponentFiles(docHandle); 
    6667    parseComponents(docHandle); 
    6768    parseHostCollocation(docHandle); 
    6869    parseAssemblyController(docHandle); 
    6970    parseExternalPorts(docHandle); 
     71} 
     72 
     73void SADParser::parseComponentFiles(TiXmlHandle docHandle) 
     74{ 
     75    DEBUG(6, SADParser, "About to parse component files"); 
     76 
     77    TiXmlElement *cf = docHandle.FirstChild("componentfiles").FirstChild("componentfile").Element(); 
     78 
     79    for (; cf; cf = cf->NextSiblingElement()) { 
     80        componentFiles.push_back (new SADComponentFile (cf)); 
     81    } 
    7082} 
    7183 
     
    179191} 
    180192 
    181 const char *SADParser::getSPDById(const char *refId) 
    182 { 
    183  
    184 } 
     193const char *SADParser::getSPDById(const char *_refId) 
     194{ 
     195    std::string refId(_refId); 
     196 
     197    for(unsigned int i(0); i < componentFiles.size(); ++i) { 
     198        std::string testId = componentFiles[i]->getId(); 
     199 
     200        if (refId == testId) 
     201            return componentFiles[i]->getFileName(); 
     202    } 
     203 
     204    return NULL; 
     205}