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

@ -20,6 +20,7 @@ To customise your libragephoto build, the following <a href="#flags">Optional CM
-DCMAKE_CXX_STANDARD=17
-DRAGEPHOTO_BENCHMARK=ON
-DRAGEPHOTO_C_API=OFF
-DRAGEPHOTO_C_LIBRARY=ON
-DRAGEPHOTO_DOC=ON
-DRAGEPHOTO_EXAMPLE_GTKVIEWER=ON
-DRAGEPHOTO_EXAMPLE_QTVIEWER=ON

View file

@ -14,7 +14,7 @@
<b>Reference</b>
RagePhoto (C++ API)
RagePhotoA (C++ API based on C API)
RagePhotoC.h (C API)
RagePhoto.h (C API)
RagePhotoData (Data Object Struct)
RagePhotoFormatParser (Custom Format Parser Struct)

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