void BasicHDT::createComponents() { |
| // HEADER |
| header = new PlainHeader(); |
|
|
| // DICTIONARY |
| std::string dictType = spec.get("dictionary.type"); |
| if(dictType==HDTVocabulary::DICTIONARY_TYPE_FOUR) { |
| dictionary = new FourSectionDictionary(spec); |
| } else if(dictType==HDTVocabulary::DICTIONARY_TYPE_PLAIN) { |
| dictionary = new PlainDictionary(spec); |
| } else if(dictType==HDTVocabulary::DICTIONARY_TYPE_LITERAL) { |
| #ifdef HAVE_CDS |
| dictionary = new LiteralDictionary(spec); |
| #else |
| throw "This version has been compiled without support for this dictionary"; |
| #endif |
| } else { |
| dictionary = new FourSectionDictionary(spec); |
| } |
|
|
| // TRIPLES |
| std::string triplesType = spec.get("triples.type"); |
| if(triplesType==HDTVocabulary::TRIPLES_TYPE_BITMAP) { |
| triples = new BitmapTriples(spec); |
| } else if(triplesType==HDTVocabulary::TRIPLES_TYPE_COMPACT) { |
| triples = new CompactTriples(spec); |
| } else if(triplesType==HDTVocabulary::TRIPLES_TYPE_PLAIN) { |
| triples = new PlainTriples(spec); |
| } else if(triplesType==HDTVocabulary::TRIPLES_TYPE_TRIPLESLIST) { |
| triples = new TriplesList(spec); |
| #ifndef WIN32 |
| } else if (triplesType == HDTVocabulary::TRIPLES_TYPE_TRIPLESLISTDISK) { |
| triples = new TripleListDisk(); |
| #endif |
| } else { |
| triples = new BitmapTriples(spec); |
| } |
| } |