2 #ifndef vsl_clipon_binary_loader_h_ 3 #define vsl_clipon_binary_loader_h_ 12 # include <vcl_msvc_warnings.h> 77 template<
class BaseClass,
class BaseClassIO>
103 void add(
const BaseClassIO& b);
110 const BaseClassIO&
object_io(
const std::string& name)
const;
113 const BaseClassIO&
io_for_class(
const BaseClass& b)
const;
153 #endif // vsl_clipon_binary_loader_h_ std::vector< BaseClassIO * > object_io_
List of object loaders.
A binary output adaptor for any std::ostream.
vsl_clipon_binary_loader()=default
Constructor.
static vsl_clipon_binary_loader< BaseClass, BaseClassIO > & instance()
Returns the instance variable for the singleton.
static vsl_clipon_binary_loader< BaseClass, BaseClassIO > * instance_
the singleton object.
Base class for vsl_binary_loader objects.
void write_object(vsl_b_ostream &is, const BaseClass *b)
Writes object to stream given base class pointer.
const std::vector< BaseClassIO * > & object_io() const
Return current list of individual IO objects.
void print_object_summary(std::ostream &os, const BaseClass *b)
Prints summary of object state to stream given base class pointer.
~vsl_clipon_binary_loader() override
Destructor.
void add(const BaseClassIO &b)
Add example object to list of those that can be loaded.
int index_for_name(const std::string &name) const
Return index associated with given object name.
const BaseClassIO & io_for_class(const BaseClass &b) const
Return IO object that can deal with given class.
void make_empty()
Remove all example objects.
void vsl_b_read(vsl_b_istream &is, char &n)
Read char from vsl_b_istream.
An adaptor for any std::istream to make it suitable for binary input.
void read_object(vsl_b_istream &is, BaseClass *&b)
Reads object from stream and sets base class pointer.
Class to load objects by baseclass pointer using ‘clipon’ classes.
Set of functions, and objects to perform binary IO.