10#ifndef INCLUDED_LIBEPUBGEN_UTILS_H
11#define INCLUDED_LIBEPUBGEN_UTILS_H
19#include <boost/cstdint.hpp>
21#include <librevenge-stream/librevenge-stream.h>
23#if defined(HAVE_FUNC_ATTRIBUTE_FORMAT)
24#define EPUBGEN_ATTRIBUTE_PRINTF(fmt, arg) __attribute__((format(printf, fmt, arg)))
26#define EPUBGEN_ATTRIBUTE_PRINTF(fmt, arg)
37#define EPUBGEN_DEBUG_MSG(M) libepubgen::debugPrint M
38#define EPUBGEN_DEBUG(M) M
42#define EPUBGEN_DEBUG_MSG(M)
43#define EPUBGEN_DEBUG(M)
47#define EPUBGEN_NUM_ELEMENTS(array) (sizeof(array) / sizeof(array[0]))
59template<
typename T,
typename... Args>
62 return std::unique_ptr<T>(
new T(std::forward<Args>(args)...));
Definition: libepubgen_utils.h:66
#define EPUBGEN_ATTRIBUTE_PRINTF(fmt, arg)
Definition: libepubgen_utils.h:26
Definition: EPUBBinarySink.cpp:13
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libepubgen_utils.h:52
std::unique_ptr< T > make_unique(Args &&... args)
Definition: libepubgen_utils.h:60
Definition: libepubgen_utils.h:55
void operator()(void *)
Definition: libepubgen_utils.h:56