QtRestClient
3.0.0
A library for generic JSON-based REST-APIs, with a mechanism to map JSON to Qt objects
|
A factory interface to create IPaging instances from raw data. More...
#include <ipaging.h>
Public Member Functions | |
virtual IPaging * | createPaging (QtJsonSerializer::SerializerBase *serializer, const std::variant< QCborValue, QJsonValue > &data) const =0 |
Creates a new paging object of the given data. More... | |
A factory interface to create IPaging instances from raw data.
In order to use paging, you need a factory to create those. A default IPagingFactory is used to do so. However, if you need to reimplement IPaging, you need to create a factory as well.
|
pure virtual |
Creates a new paging object of the given data.
serializer | A json serializer, if you want to use it for deserialization |
data | The paging CBOR/JSON data to be loaded into a IPaging interface |
QJsonSerializer::DeserializationException | Will be thrown if the passed json data is not a valid paging object |
When reimplementing this function, make shure to not return nullptr
, if the creation failed. throw an exception instead, as specified by this documenation