Go to the documentation of this file.00001
00002
00003
00004 #ifndef OSL_RECORD_KI2_H
00005 #define OSL_RECORD_KI2_H
00006
00007 #include "osl/record/record.h"
00008 #include "osl/record/kanjiMove.h"
00009 #include <string>
00010 #include <iosfwd>
00011
00012 namespace osl
00013 {
00014 namespace record
00015 {
00016 namespace ki2
00017 {
00018 class InputStream : public IRecordStream
00019 {
00020 private:
00021 std::istream& is;
00022 SimpleState state;
00023 osl::record::KanjiMove kmove;
00024 RecordVisitor rv;
00025 public:
00026 InputStream(std::istream& is, bool verbose=false);
00027 virtual ~InputStream();
00028
00030 virtual void load(Record*);
00031 const SimpleState& getState() const { return state;}
00032 };
00033
00039 class Ki2File
00040 {
00041 private:
00042 Record rec;
00043 bool verbose;
00044 public:
00045 Ki2File(const std::string& fileName, bool verbose=false);
00046 Record const& getRecord() const;
00047 const NumEffectState getInitialState() const;
00048 };
00049
00050 const std::string show(Square);
00051 const std::string show(Square cur, Square prev);
00052 const std::string show(Ptype);
00053 const std::string showPromote(bool);
00054 const std::string show(Move move, const NumEffectState& state, Move prev=Move());
00055 const std::string show(const Move *first, const Move *last, const NumEffectState& state, Move prev=Move());
00056 const std::string show(const Move *first, const Move *last, const char *threatmate_first, const char *threatmate_last, const NumEffectState& state, Move prev=Move());
00057 }
00058 }
00059 using record::ki2::Ki2File;
00060 }
00061
00062 #endif
00063
00064
00065
00066