Abstract base class wrapping support for a specific storage format, such as JSON. More...
#include <Format.h>
Public Member Functions | |
| virtual std::unique_ptr< ExportStream > | createExportStream (Database &db, const ExportOptions &options={}) const =0 |
| Create a stream to serialize the entire database. More... | |
| virtual std::unique_ptr< ExportStream > | createExportStream (StoreRef store, const Object &object, const ExportOptions &options={}) const =0 |
| Create a stream to serialize an Object. More... | |
| virtual size_t | exportToStream (const Object &object, Print &output, const ExportOptions &options={}) const =0 |
| Print object. More... | |
| virtual size_t | exportToStream (Database &database, Print &output, const ExportOptions &options={}) const =0 |
| Serialise entire database directly to an output stream. More... | |
| virtual std::unique_ptr< ImportStream > | createImportStream (Database &db) const =0 |
| Create a stream for de-serialising (writing) into the database Used when updating a database from a remote web client, for example via HttpRequest. More... | |
| virtual std::unique_ptr< ImportStream > | createImportStream (StoreUpdateRef &store, Object &object) const =0 |
| Create a stream for de-serialising (writing) into a store. More... | |
| virtual Status | importFromStream (Object &object, Stream &source) const =0 |
| De-serialise content from stream into object (RAM) More... | |
| virtual Status | importFromStream (Database &database, Stream &source) const =0 |
| De-serialise content from stream into database Each store is overwritten as it is loadded. If a store entry is not represented in the data then it is left untouched. More... | |
| virtual String | getFileExtension () const =0 |
| Get the standard file extension for the reader implementation. More... | |
| virtual MimeType | getMimeType () const =0 |
| Get the MIME type for this reader format. More... | |
Detailed Description
Abstract base class wrapping support for a specific storage format, such as JSON.
Member Function Documentation
◆ createExportStream() [1/2]
|
pure virtual |
Create a stream to serialize the entire database.
- Parameters
-
database The database to serialize options Advanced settings for adjusting output
This is used for streaming asychronously to a web client, for example in an HttpResponse.
Implemented in ConfigDB::Json::Format.
◆ createExportStream() [2/2]
|
pure virtual |
Create a stream to serialize an Object.
- Parameters
-
store Shared pointer to store object Object to start streaming from options Advanced settings for adjusting output
Used for streaming asychronously to a web client, for example in an HttpResponse.
Implemented in ConfigDB::Json::Format.
◆ createImportStream() [1/2]
|
pure virtual |
Create a stream for de-serialising (writing) into the database Used when updating a database from a remote web client, for example via HttpRequest.
Implemented in ConfigDB::Json::Format.
◆ createImportStream() [2/2]
|
pure virtual |
Create a stream for de-serialising (writing) into a store.
- Parameters
-
store Shared pointer to store with write access object Object to start streaming to
Used when updating a store from a remote web client, for example via HttpRequest
Implemented in ConfigDB::Json::Format.
◆ exportToStream() [1/2]
|
pure virtual |
Print object.
- Parameters
-
object The object to serialize output Where to write output options Advanced settings for adjusting output
- Return values
-
size_t Number of characters written
Implemented in ConfigDB::Json::Format.
◆ exportToStream() [2/2]
|
pure virtual |
Serialise entire database directly to an output stream.
- Parameters
-
database The database to serialize output Where to write output options Advanced settings for adjusting output
- Return values
-
size_t Number of bytes written to the stream
Implemented in ConfigDB::Json::Format.
◆ getFileExtension()
|
pure virtual |
Get the standard file extension for the reader implementation.
Implemented in ConfigDB::Json::Format.
◆ getMimeType()
|
pure virtual |
Get the MIME type for this reader format.
Implemented in ConfigDB::Json::Format.
◆ importFromStream() [1/2]
|
pure virtual |
De-serialise content from stream into database Each store is overwritten as it is loadded. If a store entry is not represented in the data then it is left untouched.
Implemented in ConfigDB::Json::Format.
◆ importFromStream() [2/2]
|
pure virtual |
De-serialise content from stream into object (RAM)
Implemented in ConfigDB::Json::Format.
The documentation for this class was generated from the following file:
1.9.1