KJB
|
Abstract class to read this object from an input stream. More...
#include <l_readable.h>
Public Member Functions | |
virtual | ~Readable () |
Deletes this Readable. More... | |
virtual void | read (std::istream &in)=0 |
Reads this Readable from an input stream. More... | |
virtual void | read (const char *fname) |
Reads this Readable from a file. More... | |
Static Public Member Functions | |
static const char * | read_field_value (std::istream &in, const char *field_name, char *field_buf, size_t buf_len, char separator=':') |
Reads a line off in into a buffer and returns a pointer to the field value in the buffer. More... | |
static const char * | read_field_value (std::istream &in, const char *field_name, char separator=':') |
Reads a line off in into an internal buffer and returns a pointer to the field value in the buffer. More... | |
Abstract class to read this object from an input stream.
|
inlinevirtual |
Deletes this Readable.
|
pure virtual |
Reads this Readable from an input stream.
Implemented in kjb::Line_segment, kjb::Edge_segment_set, kjb::Vanishing_point, kjb::Polymesh, kjb::Perspective_camera, kjb::Parapiped, kjb::Frustum, kjb::Model_edge, kjb::Features_manager, kjb::Color_histogram, kjb::Edge_segment, kjb::Learned_discrete_prior, kjb::Cylinder_section, kjb::Corner, kjb::Hog_responses, kjb::Triangular_mesh, kjb::Parametric_frustum, kjb::Parametric_parapiped, kjb::Circle_in_3d, kjb::Manhattan_hog, kjb::Collinear_segment_chain, kjb::Line_segment_set, kjb::Cylinder, kjb::Polygon, and kjb::Parametric_sphere.
|
virtual |
Reads this Readable from a file.
fname | Input file to read from. |
kjb::IO_error | Could not read from fname. |
kjb::Illegal_argument | Invalid arguments in the file to read from. |
Reimplemented in kjb::Edge_segment_set, kjb::Perspective_camera, kjb::Features_manager, kjb::Color_histogram, kjb::Learned_discrete_prior, kjb::Parametric_frustum, kjb::Parametric_parapiped, kjb::Circle_in_3d, kjb::Line_segment_set, kjb::Cylinder, and kjb::Parametric_sphere.
|
static |
Reads a line off in into a buffer and returns a pointer to the field value in the buffer.
Reads a line off the input stream as a field with format:
Where the separator here is a ':'.
in | Input stream to read the field line from. |
field_name | Name of the field to get the value of. |
field_buf | Buffer to read the line of input into. |
buf_len | Length of the buffer. |
separator | Character separating the field name and value. The default is ':'. The zero character is not allowed. |
kjb::Illegal_argument | Either the field is not the one named or it is not formatted properly. |
kjb::IO_error | Could not read a line from the input stream. |
|
static |
Reads a line off in into an internal buffer and returns a pointer to the field value in the buffer.
Reads a line off the input stream as a field with format:
Where the separator here is a ':'.
in | Input stream to read the field line from. |
field_name | Name of the field to get the value of. |
separator | Character separating the field name and value. The default is ':'. |
kjb::Illegal_argument | Either the field is not the one named or it is not formatted properly. |
kjb::IO_error | Could not read a line from the input stream. |