Show
Ignore:
Timestamp:
02/21/07 22:31:44 (1 year ago)
Author:
ug
Message:

Make SGF parser handle long property names.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 06/libkombilo/sgfparser.h

    r195 r222  
    5959char* SGFescape(const char* s); 
    6060 
     61class PropValue { 
     62  public: 
     63    PropValue(std::string IDC, std::vector<std::string>* PV); 
     64    ~PropValue(); 
     65    std::string IDcomplete; 
     66    std::vector<std::string>* pv; 
     67}; 
     68 
    6169class Node { 
    6270  public: 
     
    7179    std::vector<std::string> gpv(const std::string& prop); 
    7280    std::vector<std::string>* get_property_value(const std::string& prop); 
    73     void set_property_value(std::string& ID, std::vector<std::string>* propValue) throw(SGFError); 
     81    void set_property_value(std::string& IDcomplete, std::vector<std::string>* propValue) throw(SGFError); 
    7482 
    7583    int posyD; // used when displaying SGF structure graphically as a tree 
     
    8189    static int sloppy; 
    8290  private: 
    83     std::map<std::string, std::vector<std::string>* > data; // use get_property_value to access this 
     91    std::map<std::string, PropValue> data; // use get_property_value to access this 
    8492}; 
    8593 
     
    120128}; 
    121129 
    122 std::string nodeToString(std::map<std::string, std::vector<std::string>* >& data) throw(SGFError); 
     130std::string nodeToString(std::map<std::string, PropValue >& data) throw(SGFError); 
    123131// char* rootNodeToString(PyObject* data); 
    124132