-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFullTextEntry.cpp
53 lines (43 loc) · 1.13 KB
/
FullTextEntry.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// FullTextEntry.cpp
// AmiKo-wx
//
// Created by Alex Bettarini on 3 Jul 2020
// Copyright © 2020 Ywesee GmbH. All rights reserved.
#include "FullTextEntry.hpp"
FullTextEntry::FullTextEntry()
{
}
// 54
// Unused ?
wxString FullTextEntry::getRegnrs()
{
wxString regStr;
std::map<wxString, std::set<wxString>>::iterator it;
for (it = regChaptersDict.begin(); it != regChaptersDict.end(); ++it) {
std::set<wxString> value = it->second;
for (auto s : value)
regStr += wxString::Format("%s,", s);
// TODO: std::cout << "key=" << it->first << " value=" << value;
}
return regStr;
}
// 67
std::set<wxString> FullTextEntry::getChaptersForKey(wxString ®nr)
{
return regChaptersDict[regnr];
}
// 72
wxArrayString FullTextEntry::getRegnrsAsArray()
{
//return [regChaptersDict allKeys];
wxArrayString regStr;
std::map<wxString, std::set<wxString>>::iterator it;
for (it = regChaptersDict.begin(); it != regChaptersDict.end(); ++it)
regStr.Add( it->first );
return regStr;
}
// 77
unsigned long FullTextEntry::getNumHits()
{
return regChaptersDict.size();
}