2002-02-16 15:59:55 +00:00
|
|
|
// -*- C++ -*-
|
2001-07-13 11:50:39 +00:00
|
|
|
#ifndef SP_BASE_H
|
|
|
|
#define SP_BASE_H
|
|
|
|
|
2001-09-21 12:11:24 +00:00
|
|
|
// needed for pid_t typedef
|
|
|
|
#include <sys/types.h>
|
2002-01-16 16:00:14 +00:00
|
|
|
#include "LString.h" // can't forward declare...
|
2001-09-21 12:11:24 +00:00
|
|
|
|
2001-07-13 11:50:39 +00:00
|
|
|
class BufferParams;
|
|
|
|
|
|
|
|
class SpellBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
/// status
|
|
|
|
enum spellStatus {
|
|
|
|
ISP_OK = 1,
|
|
|
|
ISP_ROOT,
|
|
|
|
ISP_COMPOUNDWORD,
|
|
|
|
ISP_UNKNOWN,
|
|
|
|
ISP_MISSED,
|
|
|
|
ISP_IGNORE
|
|
|
|
};
|
2002-03-21 17:27:08 +00:00
|
|
|
|
2001-07-13 11:50:39 +00:00
|
|
|
virtual ~SpellBase() {}
|
|
|
|
|
2002-02-16 15:59:55 +00:00
|
|
|
virtual void initialize(BufferParams const & , string const &) = 0;
|
2001-07-13 11:50:39 +00:00
|
|
|
|
|
|
|
virtual bool alive() = 0;
|
2002-03-21 17:27:08 +00:00
|
|
|
|
2001-07-13 11:50:39 +00:00
|
|
|
virtual void cleanUp() = 0;
|
|
|
|
|
|
|
|
virtual enum spellStatus check(string const &) = 0;
|
|
|
|
|
|
|
|
virtual void close() = 0;
|
|
|
|
|
2002-02-16 15:59:55 +00:00
|
|
|
virtual void insert(string const &) = 0;
|
2001-07-13 11:50:39 +00:00
|
|
|
|
2002-02-16 15:59:55 +00:00
|
|
|
virtual void accept(string const &) = 0;
|
2001-07-13 11:50:39 +00:00
|
|
|
|
2002-02-16 15:59:55 +00:00
|
|
|
virtual void store(string const & , string const &) = 0;
|
2001-07-13 11:50:39 +00:00
|
|
|
|
|
|
|
virtual char const * error() = 0;
|
|
|
|
|
|
|
|
virtual char const * nextMiss() = 0;
|
2002-03-21 17:27:08 +00:00
|
|
|
|
2001-07-13 11:50:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|