Flip Reference

 

DocumentServer Class Reference

Namespace

ohm::flip

Inherits from

ohm::flip::DocumentBase

Declared in

ohm/flip/DocumentServer.h

See Also

ohm::flip::DocumentSignal

ohm::flip::DocumentTweaker

ohm::flip::DocumentValidator

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

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);

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);

begin_transaction

Explicitely starts a server transaction.

void           begin_transaction ();

end_transaction

Explicitely ends a server transaction.

void           end_transaction ();