git-svn-id: https://websvn.glenux.net/svn/Upoc/cryptaffinity/trunk@1175 eaee96b3-f302-0410-b096-c6cfd47f7835
21 lines
496 B
C++
21 lines
496 B
C++
#ifndef _CRYPTAFINIY_WORDLIST_HH
|
|
#define _CRYPTAFINIY_WORDLIST_HH
|
|
|
|
#include <map>
|
|
#include "text.hh"
|
|
|
|
namespace LibCryptAfinity {
|
|
class WordList {
|
|
private:
|
|
std::map<Text, int> _word2int; // existance du mot
|
|
std::map<int, TextCounter> _letter2wordnref;
|
|
|
|
public:
|
|
// texte, reference dans le texte global, longueur
|
|
void addWord(Text t, int ref, int len);
|
|
|
|
// retourne les mots qui contiennent le caractere choisi
|
|
std::map<Text,int> getWordsContaining(int val);
|
|
};
|
|
}
|
|
#endif
|