feisty meow concerns codebase
2.140
|
a base for classes that can stream their contents out to a textual form. More...
#include <contracts.h>
Public Member Functions | |
virtual bool | produce (base_string &target) const =0 |
sends the derived class's member data into the "target" in a reversible manner. More... | |
virtual bool | consume (const base_string &source)=0 |
chows down on a string that supposedly contains a streamed form. More... | |
Public Member Functions inherited from basis::nameable | |
virtual const char * | class_name () const =0 |
Returns the bare name of this class as a constant character pointer. More... | |
a base for classes that can stream their contents out to a textual form.
Definition at line 170 of file contracts.h.
|
pure virtual |
chows down on a string that supposedly contains a streamed form.
the derived class must know how to eat just the portion of the string that holds its data type and no more.
|
pure virtual |
sends the derived class's member data into the "target" in a reversible manner.
this should use a tagging system of some sort so that not only can the derived class verify that its type is really right there in the string, but also that it gets all of its class data and no other data. the "target" will be destructively consumed, and after a successful call will no longer contain the object's streamed form at its head.