presage
0.9.1
src
tools
simulator
simulator.h
Go to the documentation of this file.
1
2
/******************************************************
3
* Presage, an extensible predictive text entry system
4
* ---------------------------------------------------
5
*
6
* Copyright (C) 2008 Matteo Vescovi <matteo.vescovi@yahoo.co.uk>
7
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License along
19
with this program; if not, write to the Free Software Foundation, Inc.,
20
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
*
22
**********(*)*/
23
24
25
#ifndef PRESAGE_SIMULATOR
26
#define PRESAGE_SIMULATOR
27
28
#include "
presage.h
"
29
30
#include <sstream>
31
52
class
Simulator
{
53
public
:
54
Simulator
(
PresageCallback
* callback,
55
std::stringstream& sstream,
56
const
std::string =
""
);
57
~Simulator
();
58
59
void
simulate
(std::string);
60
// void reset();
61
void
results
()
const
;
62
int
getKi
()
const
;
63
int
getKs
()
const
;
64
int
getKn
()
const
;
65
double
getKSR
()
const
;
66
67
bool
getAutoSpace
()
const
;
68
void
setAutoSpace
(
bool
);
69
70
void
setKs
(
int
);
71
72
void
silentMode
(
bool
);
73
74
private
:
75
Presage
*
presagePtr
;
76
77
bool
find
(
const
std::vector<std::string>&,
const
std::string& )
const
;
78
79
bool
autoSpace
;
// determines whether predictive system is able to insert a space at the end of the word
80
81
int
ki
;
82
int
ks
;
83
int
kn
;
84
85
bool
silent_mode
;
86
87
std::stringstream&
m_sstream
;
88
};
89
90
91
#endif // PRESAGE_SIMULATOR
Simulator::getKn
int getKn() const
Definition:
simulator.cpp:196
Simulator::~Simulator
~Simulator()
Definition:
simulator.cpp:45
Simulator::getKs
int getKs() const
Definition:
simulator.cpp:190
Simulator::ks
int ks
Definition:
simulator.h:100
Simulator::getAutoSpace
bool getAutoSpace() const
Definition:
simulator.cpp:235
Simulator::getKSR
double getKSR() const
Definition:
simulator.cpp:202
Simulator::find
bool find(const std::vector< std::string > &, const std::string &) const
Definition:
simulator.cpp:215
Simulator
Definition:
simulator.h:51
Simulator::getKi
int getKi() const
Definition:
simulator.cpp:184
Simulator::Simulator
Simulator(PresageCallback *callback, std::stringstream &sstream, const std::string="")
Definition:
simulator.cpp:28
Simulator::kn
int kn
Definition:
simulator.h:101
presage.h
Simulator::ki
int ki
Definition:
simulator.h:99
Simulator::silentMode
void silentMode(bool)
Definition:
simulator.cpp:245
Simulator::simulate
void simulate(std::string)
Definition:
simulator.cpp:51
Simulator::m_sstream
std::stringstream & m_sstream
Definition:
simulator.h:105
Simulator::autoSpace
bool autoSpace
Definition:
simulator.h:97
Simulator::setAutoSpace
void setAutoSpace(bool)
Definition:
simulator.cpp:240
Presage
Presage, the intelligent predictive text entry platform.
Definition:
presage.h:105
Simulator::silent_mode
bool silent_mode
Definition:
simulator.h:103
Simulator::presagePtr
Presage * presagePtr
Definition:
simulator.h:93
PresageCallback
Definition:
presageCallback.h:65
Simulator::results
void results() const
Definition:
simulator.cpp:163
Simulator::setKs
void setKs(int)
Definition:
simulator.cpp:208
Generated on Sat Jan 11 2020 18:56:52 for presage by
1.8.16