libzmf_utils.h File Reference documentation

Classes | Namespaces | Macros | Typedefs | Functions
libzmf_utils.h File Reference
`#include <cmath>`
`#include <memory>`
`#include <string>`
`#include <bitset>`
`#include <boost/cstdint.hpp>`
`#include <librevenge-stream/librevenge-stream.h>`
`#include <librevenge/librevenge.h>`

Go to the source code of this file.

## Classes
struct | libzmf::ZMFDummyDeleter
struct | libzmf::EndOfStreamException
struct | libzmf::GenericException

## Namespaces
namespace | libzmf

## Macros
#define | ZMF_EPSILON 1E-6
#define | ZMF_ALMOST_ZERO(m)
#define | ZMF_FALLTHROUGH ((void) 0)
#define | ZMF_DEBUG_MSG(M)
#define | ZMF_DEBUG(M)
#define | ZMF_NUM_ELEMENTS(array)

## Typedefs
typedef std::shared_ptr< librevenge::RVNGInputStream > | libzmf::RVNGInputStreamPtr

## Functions
template<typename T>
std::string | libzmf::prettyTypeName ()
uint8_t | libzmf::readU8 (const RVNGInputStreamPtr &input, bool)
uint16_t | libzmf::readU16 (const RVNGInputStreamPtr &input, bool bigEndian)
uint32_t | libzmf::readU32 (const RVNGInputStreamPtr &input, bool bigEndian)
uint64_t | libzmf::readU64 (const RVNGInputStreamPtr &input, bool bigEndian)
int32_t | libzmf::readS32 (const RVNGInputStreamPtr &input, bool bigEndian)
float | libzmf::readFloat (const RVNGInputStreamPtr &input, bool bigEndian)
const unsigned char * | libzmf::readNBytes (const RVNGInputStreamPtr &input, const unsigned long numBytes)
void | libzmf::skip (const RVNGInputStreamPtr &input, unsigned long numBytes)
void | libzmf::seek (const RVNGInputStreamPtr &input, const unsigned long pos)
void | libzmf::seekRelative (const RVNGInputStreamPtr &input, const long pos)
unsigned long | libzmf::getLength (const RVNGInputStreamPtr &input)
void | libzmf::appendCharacters (librevenge::RVNGString &text, const unsigned char *characters, uint32_t size, const char *encoding)
void | libzmf::writeU16 (librevenge::RVNGBinaryData &buffer, const int value)
void | libzmf::writeU32 (librevenge::RVNGBinaryData &buffer, const int value)
double | libzmf::rad2deg (double value)
double | libzmf::normalizeAngle (double radAngle)
template<std::size_t numBytes>
std::bitset< numBytes *8 > | libzmf::bytesToBitset (const uint8_t *data)
template<typename T>
double | libzmf::um2in (T micrometers)

## Macro Definition Documentation

## ◆ ZMF_ALMOST_ZERO

#define ZMF_ALMOST_ZERO | ( |  | m | ) |

Value:
(std::fabs(m) <= ZMF_EPSILON)
ZMF_EPSILON
#define ZMF_EPSILON
Definition libzmf_utils.h:32

Referenced by libzmf::BoundingBox::BoundingBox(), libzmf::ZMFCollector::collectArc(), libzmf::ZMFCollector::collectEllipse(), libzmf::ZMFCollector::collectImage(), libzmf::ZMFCollector::collectTextObject(), libzmf::ZMF4Parser::readEllipse(), and libzmf::ZMFCollector::writePen().

## ◆ ZMF_DEBUG

#define ZMF_DEBUG | ( |  | M | ) |

## ◆ ZMF_DEBUG_MSG

#define ZMF_DEBUG_MSG | ( |  | M | ) |

Referenced by libzmf::appendCharacters(), libzmf::BMIHeader::load(), libzmf::ZMF4Parser::parseObjectType(), libzmf::ZMF4Parser::readArrow(), libzmf::ZMF4Parser::readBitmap(), libzmf::ZMF4Parser::readCurveComponents(), libzmf::ZMF4Parser::readCurveSectionTypes(), libzmf::ZMF4Parser::readFill(), libzmf::ZMF4Parser::readFont(), libzmf::ZMF4Parser::readGradient(), libzmf::ZMF4Parser::readObjectHeader(), libzmf::ZMF4Parser::readParagraphStyle(), libzmf::ZMF4Parser::readPen(), libzmf::ZMF4Parser::readPolygon(), libzmf::ZMF4Parser::readShadow(), libzmf::ZMF4Parser::readTable(), libzmf::ZMF4Parser::readText(), libzmf::ZMF4Parser::readTextFrame(), and libzmf::ZMF4Parser::readTransparency().

## ◆ ZMF_EPSILON

#define ZMF_EPSILON 1E-6

## ◆ ZMF_FALLTHROUGH

#define ZMF_FALLTHROUGH ((void) 0)

## ◆ ZMF_NUM_ELEMENTS

#define ZMF_NUM_ELEMENTS | ( |  | array | ) |

Value:
sizeof(array)/sizeof(array[0])