ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-1.0/utils/sysbuilder/LatticeFactory.cpp
(Generate patch)

Comparing trunk/OOPSE-1.0/utils/sysbuilder/LatticeFactory.cpp (file contents):
Revision 1423 by tim, Wed Jul 28 04:58:20 2004 UTC vs.
Revision 1429 by tim, Wed Jul 28 20:29:49 2004 UTC

# Line 9 | Line 9 | static LatticeFactory::LatticeFactory* getInstance(){
9          }  
10   }
11  
12 < static LatticeFactory::LatticeFactory* getInstance(){
12 > LatticeFactory* LatticeFactory::getInstance(){
13          if (instance == NULL)
14        instance = new LatticeFactory();
15          
16          return instance;
17   }
18  
19 < bool LatticeFactory::registerCreator( const LatticeCreator*  latCreator ){  
20 <  string latticeType = latCreator->GetType();
19 > bool LatticeFactory::registerCreator( BaseLatticeCreator*  latCreator ){  
20 >  string latticeType = latCreator->getType();
21    map<string, BaseLatticeCreator*>::iterator mapIter;
22  
23    mapIter = creatorMap.find(latticeType);
# Line 33 | Line 33 | BaseLattice* LatticeFactory::createLattice( const stri
33    }
34   }
35  
36 < BaseLattice* LatticeFactory::createLattice( const string& latticeType ){
37 <  string latticeType = latCreator->GetType();
38 <  map<string, BaseLatticeCreator*>::iterator mapIter;
39 <  BaseLatticeCreator* creator;
36 > BaseLattice* LatticeFactory::createLattice( const string& latticeType ){
37 >  map<string, BaseLatticeCreator*>::iterator mapIter;
38    
39    mapIter = creatorMap.find(latticeType);
40  
41    if (mapIter != creatorMap.end()) {
42 <    creator = mapIter->second;
45 <    return creator->createLattice();
42 >     return (mapIter->second)->createLattice();
43    }
44    else
45      return NULL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines