Fixed object filename clash
[SXSI/TextCollection.git] / TextCollectionBuilder.cpp
1 #include "TextCollectionBuilder.h"
2 #include "FMIndexBuilder.h"
3 #include "SWCSABuilder.h"
4
5 namespace SXSI
6 {
7 TextCollectionBuilder* TextCollectionBuilder::create(unsigned samplerate, 
8                                      index_type_t type,
9                                      ulong estimatedInputLength)
10 {
11     switch (type)
12     {
13     case index_type_default:
14         return new FMIndexBuilder(samplerate, estimatedInputLength);
15         break;
16     case index_type_swcsa:
17         return new SWCSABuilder(samplerate);
18         break;
19     }
20     std::cerr << "TextCollectionBuilder::create(): unknown type given: expecting enum value, type = " << type << std::endl;
21     std::exit(2);
22 }
23
24 } // Namespace SXSI