libragephoto: add RagePhotoB for best implementation

CMakeLists.txt: add RagePhotoB class, improve settings clarification
doc/build.doc: add RAGEPHOTO_C_LIBRARY flag
doc/index.doc: correct RagePhoto.h header
doc/usage.doc: fix minor documentation issue, clarify class differences
ragephoto-gtkviewer: use RagePhotoB class
ragephoto-qtviewer: use RagePhotoB class
RagePhoto-Extract.cpp: use RagePhotoB class
RagePhoto.cpp: LIBRAGEPHOTO_C_API -> LIBRAGEPHOTO_CXX_C
RagePhotoA.hpp: simplify brief
RagePhotoB.hpp: add best implementation detection
RagePhotoLibrary.h: fix WASM C API inclusion by default
README.md: add RAGEPHOTO_C_LIBRARY flag
This commit is contained in:
Syping 2023-06-11 05:41:32 +02:00
parent d7943e552d
commit 12507be85d
13 changed files with 81 additions and 38 deletions

View file

@ -4,10 +4,10 @@
<h4 id="cxx_include_usage">Including and using RagePhoto</h4>
Include RagePhoto.h or RagePhotoA.h
Include RagePhoto (C++ native), RagePhotoA (C API wrapper) or \link RagePhotoB.hpp RagePhotoB \endlink (best implementation)
\code{.cpp}
#include <RagePhoto.h>
#include <RagePhoto>
\endcode
Create a RagePhoto object
@ -128,7 +128,7 @@ const bool loaded = image.loadFromData(QByteArray::fromRawData(ragePhoto.jpegDat
Using the JSON in Boost.JSON
\code{.cpp}
std::error_code ec;
boost::json::error_code ec;
const boost::json::value jv = boost::json::parse(ragePhoto.json(), ec);
if (ec)
return;
@ -137,8 +137,7 @@ if (ec)
Using the JSON in Qt
\code{.cpp}
const QByteArray json = ragePhoto.json();
const QJsonDocument jd = QJsonDocument::fromJson(json);
const QJsonDocument jd = QJsonDocument::fromJson(ragePhoto.json());
if (jd.isNull())
return;
\endcode