5 #ifndef VIL_NITF2_TYPED_FIELD_FORMATTER_H 6 #define VIL_NITF2_TYPED_FIELD_FORMATTER_H 16 # include <vcl_msvc_warnings.h> 53 virtual bool read_vcl_stream(std::istream& input, T& out_value,
bool& out_blank);
85 if (read( input, value, out_blank )) {
97 if (field->
value(val)) {
98 return write(output, val);
110 std::stringstream s(str);
111 return read_vcl_stream( s, out_value, out_blank );
116 std::istream& , T& ,
bool& )
124 std::ostream& ,
const T& )
134 std::stringstream strstr;
135 write_vcl_stream(strstr, value);
136 std::string str = strstr.str();
137 output.
write(str.c_str(), str.length());
157 bool read_vcl_stream(std::istream& input,
int& out_value,
bool& out_blank)
override;
192 bool read_vcl_stream(std::istream& input,
double& out_value,
bool& out_blank)
override;
213 bool read_vcl_stream(std::istream& input,
double& out_value,
bool& out_blank)
override;
233 bool read_vcl_stream(std::istream& input,
char& out_value,
bool& out_blank)
override;
279 bool read_vcl_stream(std::istream& input, std::string& out_value,
bool& out_blank )
override;
280 bool write_vcl_stream(std::ostream& output,
const std::string& value)
override;
282 virtual bool is_valid(std::string value)
const;
383 #endif // VIL_NITF2_TYPED_FIELD_FORMATTER_H
vxl_int_32 vil_nitf2_long
virtual vil_streampos write(void const *buf, vil_streampos n)=0
Write n bytes from buf. Returns number of bytes written.
vil_nitf2: Written by Harry Voorhees (hlv@) and Rob Radtke (rob@) of Stellar Science Ltd.
virtual bool value(int &) const
Stream interface for VIL image loaders.
Typed concrete class for array fields.
virtual bool ok() const =0
Return false if the stream is broken.
Abstract class for array fields, i.e., fields that occur within a repeat loop.
vil_nitf2_enum_values & value(std::string token, std::string pretty_name="")