src/lib/INIReader.h
branchv_0
changeset 23 b497140b0b63
parent 16 db994a2ddffa
child 27 e9aad9dd823a
equal deleted inserted replaced
22:29d673a54ecf 23:b497140b0b63
    30  * TODO: Files in the src/lib directory will be moved to alt2xml and used as a shared library.
    30  * TODO: Files in the src/lib directory will be moved to alt2xml and used as a shared library.
    31  */
    31  */
    32 class INIReader {
    32 class INIReader {
    33 public:
    33 public:
    34 	virtual ~INIReader() = default;
    34 	virtual ~INIReader() = default;
       
    35 	/**
       
    36 	 * TODO: after moving to alt2xml:
       
    37 	 *        - option will be identified by globally unique URI/IRI
       
    38 	 *        - parsers will provide catalog of supported options (names, enum values, documentation)
       
    39 	 *        - options serves as both XML parser features and properties and are mapped to them
       
    40 	 */
       
    41 	virtual void setOption(const std::string& uri, const std::string& value) = 0;
       
    42 	/**
       
    43 	 * TODO: after moving to alt2xml:
       
    44 	 *        - this will be generic handler for SAX event
       
    45 	 *        - but both sides will know the schema (allowed elements and attributes for INI events)
       
    46 	 */
    35 	virtual void addHandler(INIContentHandler* handler) = 0;
    47 	virtual void addHandler(INIContentHandler* handler) = 0;
    36 	virtual void process() = 0;
    48 	virtual void process() = 0;
    37 	static INIReader* create(std::istream& input);
    49 	static INIReader* create(std::istream& input);
    38 };
    50 };
    39 
    51