4 |
|
|
5 |
|
LatticeFactory* LatticeFactory::instance = NULL; |
6 |
|
LatticeFactory::~LatticeFactory(){ |
7 |
< |
map<string, BaseLatticeCreator*>::iterator mapIter; |
7 |
> |
std::map<string, BaseLatticeCreator*>::iterator mapIter; |
8 |
|
for (mapIter = creatorMap.begin(); mapIter == creatorMap.end(); ++mapIter) { |
9 |
|
delete mapIter->second; |
10 |
|
} |
19 |
|
|
20 |
|
bool LatticeFactory::registerCreator( BaseLatticeCreator* latCreator ){ |
21 |
|
std::stringlatticeType = latCreator->getType(); |
22 |
< |
map<string, BaseLatticeCreator*>::iterator mapIter; |
22 |
> |
std::map<string, BaseLatticeCreator*>::iterator mapIter; |
23 |
|
|
24 |
|
mapIter = creatorMap.find(latticeType); |
25 |
|
|
35 |
|
} |
36 |
|
|
37 |
|
BaseLattice* LatticeFactory::createLattice( const string& latticeType ){ |
38 |
< |
map<string, BaseLatticeCreator*>::iterator mapIter; |
38 |
> |
std::map<string, BaseLatticeCreator*>::iterator mapIter; |
39 |
|
|
40 |
|
mapIter = creatorMap.find(latticeType); |
41 |
|
|
47 |
|
} |
48 |
|
|
49 |
|
bool LatticeFactory::hasLatticeCreator( const string& latticeType ){ |
50 |
< |
map<string, BaseLatticeCreator*>::iterator mapIter; |
50 |
> |
std::map<string, BaseLatticeCreator*>::iterator mapIter; |
51 |
|
|
52 |
|
mapIter = creatorMap.find(latticeType); |
53 |
|
|
59 |
|
|
60 |
|
const std::stringLatticeFactory::toString(){ |
61 |
|
std::stringresult; |
62 |
< |
map<string, BaseLatticeCreator*>::iterator mapIter; |
62 |
> |
std::map<string, BaseLatticeCreator*>::iterator mapIter; |
63 |
|
|
64 |
|
result = "Avaliable lattice creators in LatticeFactory are:\n"; |
65 |
|
|