DocumentServer Class Reference
Namespace | ohm::flip |
Inherits from | |
Declared in | ohm/flip/DocumentServer.h |
See Also | |
Overview
The DocumentServer class implements a Flip document used on the server side. The following sections will only document the public API.
Partial Class Diagram

Methods Overview
Constructor
Binding
- bind (DocumentValidatorMaster &)
- bind (DocumentSignal &)
- bind (ConverterProc)
- bind (DocumentTweakerMaster &)
Reading/Writing
Manipulating
Methods
DocumentServer constructor
Constructs a DocumentServer and bind a ComLayerServer object which will handle implements communication with the clients.
DocumentServer (ComLayerServer & com_layer); |
bind (DocumentValidatorMaster &)
Binds a DocumentValidator to the document that implements logical validation.
void bind (DocumentValidatorMaster & validator); |
The DocumentValidator will be automatically unbound when the document is released.
bind (DocumentSignal &)
Binds a DocumentSignal to the document that implements server signals.
void bind (DocumentSignal & signal); |
The DocumentSignal will be automatically unbound when the document is released.
bind (ConverterProc)
Binds a ConverterProc function to the document that implements document conversion.
void bind (ConverterProc converter_proc); |
The ConverterProc will be automatically unbound when the document is released.
The ConverterProc prototype must conform to
int converter (DataStreamOutput & output, DataStreamInput & input, bool force_flag); |
- input denotes an abstraction of the data to be converted
- output denotes an abstration of the converted data destination
- force_flag indicates if the conversion should be forced. This flag is only used in our test suite and will be always false for client of the framework
bind (DocumentTweakerMaster &)
Binds a DocumentTweaker to the document that implements post read document tweaking.
void bind (DocumentTweakerMaster & tweaker); |
The DocumentTweaker will be automatically unbound when the document is released.
read_mem
Reads a document from memory.
int read_mem (const archi::UByte * data_ptr, size_t data_size); |
read_disk
Reads a document from disk. path_0 is an fopen styled path.
int read_disk (const char * path_0); |
write_mem
Writes a document to memory.
void write_mem (std::vector <archi::UByte> & data); |
void write_mem (std::string & document); |
write_disk
Writes a document to disk. path_0 is an fopen styled path.
int write_disk (const char * path_0); |