#ifndef CONCORDIA_HDR #define CONCORDIA_HDR #include #include #include #include #include "concordia/common/config.hpp" #include "concordia/example.hpp" #include "concordia/substring_occurence.hpp" #include "concordia/concordia_config.hpp" #include "concordia/concordia_index.hpp" #include "concordia/index_searcher.hpp" #include "concordia/concordia_search_result.hpp" #include "concordia/anubis_search_result.hpp" #include /*! The Concordia class is the main access point to the library. */ class Concordia { public: /*! Constructor. \param configFilePath path to the Concordia configuration file \throws ConcordiaException */ explicit Concordia(const std::string & configFilePath) throw(ConcordiaException); /*! Destructor. */ virtual ~Concordia(); /*! Getter for version. \returns version of the Concordia library. */ std::string & getVersion(); void addExample(const Example & example) throw(ConcordiaException); void addAllExamples(const std::vector & examples) throw(ConcordiaException); std::vector simpleSearch(const std::string & pattern) throw(ConcordiaException); std::vector anubisSearch(const std::string & pattern) throw(ConcordiaException); boost::shared_ptr concordiaSearch( const std::string & pattern) throw(ConcordiaException); void loadRAMIndexFromDisk() throw(ConcordiaException); void refreshSAfromRAM() throw(ConcordiaException); private: void _initializeIndex() throw(ConcordiaException); static std::string _libraryVersion; boost::shared_ptr _config; boost::shared_ptr _index; boost::shared_ptr _searcher; boost::shared_ptr _hashGenerator; boost::shared_ptr > _T; boost::shared_ptr > _SA; boost::shared_ptr > _markers; }; #endif