22 |
23 |
23 virtual ~DataTypeReaderBase() { |
24 virtual ~DataTypeReaderBase() { |
24 }; |
25 }; |
25 |
26 |
26 /** |
27 /** |
|
28 * TODO: delete, use handler? |
|
29 * |
27 * @param input input stream, should be at position where the value is to be read; the stream will not be closed afred reading |
30 * @param input input stream, should be at position where the value is to be read; the stream will not be closed afred reading |
28 * @return read value in form of the string representation of given data type. |
31 * @return read value in form of the string representation of given data type. |
29 * E.g. integer 123 is returned as a character string "123", |
32 * E.g. integer 123 is returned as a character string "123", |
30 * boolean true is returned as a character string "true". |
33 * boolean true is returned as a character string "true". |
31 * See Relational pipes format specification for details. |
34 * See Relational pipes format specification for details. |
32 */ |
35 */ |
33 virtual string_t readString(std::istream &input) = 0; |
36 virtual string_t readString(std::istream &input) = 0; |
|
37 |
|
38 /** |
|
39 * The value is read from the input and then passed to the handler. |
|
40 * |
|
41 * @param input |
|
42 * @param handler |
|
43 */ |
|
44 virtual void read(std::istream &input, std::function<void(const void *, const std::type_info&) > handler) = 0; |
|
45 |
|
46 /** |
|
47 * TODO: documentation |
|
48 * |
|
49 * @param input |
|
50 * @param handler |
|
51 */ |
|
52 virtual void read(std::istream &input, std::function<void(const string_t&, const void *, const std::type_info&) > handler) = 0; |
34 |
53 |
35 /** |
54 /** |
36 * @param dataType data type code as defined in DDP L0 |
55 * @param dataType data type code as defined in DDP L0 |
37 * @return whether this class supports conversions of this type |
56 * @return whether this class supports conversions of this type |
38 */ |
57 */ |