All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ki2.h
Go to the documentation of this file.
1 /* ki2.h
2  */
3 
4 #ifndef OSL_RECORD_KI2_H
5 #define OSL_RECORD_KI2_H
6 
7 #include "osl/record/record.h"
8 #include "osl/record/kanjiMove.h"
9 #include <string>
10 #include <iosfwd>
11 
12 namespace osl
13 {
14  namespace record
15  {
16  namespace ki2
17  {
18  class InputStream : public IRecordStream
19  {
20  private:
21  std::istream& is;
22  SimpleState state;
25  public:
26  InputStream(std::istream& is, bool verbose=false);
27  virtual ~InputStream();
28 
30  virtual void load(Record*);
31  const SimpleState& getState() const { return state;}
32  };
33 
39  class Ki2File
40  {
41  private:
43  bool verbose;
44  public:
45  Ki2File(const std::string& fileName, bool verbose=false);
46  Record const& getRecord() const;
47  const NumEffectState getInitialState() const;
48  };
49 
50  const std::string show(Square);
51  const std::string show(Square cur, Square prev);
52  const std::string show(Ptype);
53  const std::string showPromote(bool);
54  const std::string show(Move move, const NumEffectState& state, Move prev=Move());
55  const std::string show(const Move *first, const Move *last, const NumEffectState& state, Move prev=Move());
56  const std::string show(const Move *first, const Move *last, const char *threatmate_first, const char *threatmate_last, const NumEffectState& state, Move prev=Move());
57  } // namespace ki2
58  } // namespace record
60 } // namespace osl
61 
62 #endif /* OSL_RECORD_KI2_H */
63 // ;;; Local Variables:
64 // ;;; mode:c++
65 // ;;; c-basic-offset:2
66 // ;;; End: