Files
TinyORM/include/orm/libraryinfo.hpp
T
2024-02-05 16:27:50 +01:00

61 lines
1.7 KiB
C++

#pragma once
#ifndef ORM_LIBRARYINFO_HPP
#define ORM_LIBRARYINFO_HPP
#include "orm/macros/systemheader.hpp"
TINY_SYSTEM_HEADER
#include <QVersionNumber>
#include "orm/macros/commonnamespace.hpp"
#include "orm/macros/export.hpp"
TINYORM_BEGIN_COMMON_NAMESPACE
namespace Orm
{
/*! Library class that provides information about TinyORM library. */
class SHAREDLIB_EXPORT LibraryInfo
{
Q_DISABLE_COPY_MOVE(LibraryInfo)
public:
/*! Deleted default constructor, this is a pure library class. */
LibraryInfo() = delete;
/*! Deleted destructor. */
~LibraryInfo() = delete;
/*! Return a string describing how this version of TinyORM library was built. */
static const char *build() noexcept;
/*! Return true if this build of TinyORM was built with debugging enabled, or
false if it was built in release mode. */
static bool isDebugBuild() noexcept;
/*! Return the version of the TinyORM library. */
static QVersionNumber version() noexcept Q_DECL_CONST_FUNCTION;
/*! Gather all C preprocessor macros (used by tom about). */
inline static std::map<QString, QString> allCMacrosMap();
/*! Gather TinyOrm library C preprocessor macros. */
static std::map<QString, QString> ormCMacrosMap();
/*! Gather tom C preprocessor macros. */
static std::map<QString, QString> tomCMacrosMap();
};
/* public */
std::map<QString, QString> LibraryInfo::allCMacrosMap()
{
auto result = ormCMacrosMap();
result.merge(tomCMacrosMap());
return result;
}
} // namespace Orm
TINYORM_END_COMMON_NAMESPACE
#endif // ORM_LIBRARYINFO_HPP