lipsum-cpp 0.5.4
A basic library written in C++ for generating placeholder Lorem Ipsum text.
Loading...
Searching...
No Matches
core.hpp
Go to the documentation of this file.
1
14
15#pragma once
16
17#include "version.hpp"
18
19#ifndef __cplusplus
20# error lipsum.hpp only supports C++, did you mean lipsum.h?
21#endif
22
23// suppress verbose errors
24#if defined(LIPSUM_VERBOSE) && defined(LIPSUM_QUIET)
25# undef LIPSUM_VERBOSE
26#endif
27
31#define LPSM_FLIP_COIN random_number(false, true)
32
36#define LPSM_SAFE_CCTYPE(type, func, arg) \
37 (static_cast<type>(func(static_cast<unsigned char>((arg)))))
38
42#ifdef LIPSUM_VERBOSE
43# define LPSM_VERBOSE_LOG(type, ...) \
44 lpsm::internal::LogWarn(lpsm::internal::LogType::type, \
45 __func__, \
46 " - ", \
47 __VA_ARGS__)
48#else
49# define LPSM_VERBOSE_LOG(type, ...)
50#endif
51
60#ifdef LIPSUM_BUILD_SHARED
61# ifdef _WIN32
62# ifdef LIPSUM_EXPORT_SHARED
63# define LIPSUM_API __declspec(dllexport)
64# else
65# define LIPSUM_API __declspec(dllimport)
66# endif
67# else
68# define LIPSUM_API
69# endif
70#else
71# define LIPSUM_API
72#endif
Version constants for lipsum-cpp.