LASi
util.h
Go to the documentation of this file.
1 
12 #ifndef UTIL_H
13 #define UTIL_H
14 
15 #include <stdexcept>
16 #include <string>
17 #include <iostream>
18 
19 #include <ft2build.h>
20 #include FT_FREETYPE_H
21 #include FT_GLYPH_H
22 
23 std::ostream& operator<<(std::ostream&, const FT_Library);
24 std::ostream& operator<<(std::ostream&, const FT_Face);
25 std::ostream& operator<<(std::ostream&, const FT_Glyph);
26 std::ostream& operator<<(std::ostream&, const FT_Outline);
27 
30 inline void evalReturnCode(const int errCode, const char* funcName) throw (std::runtime_error) {
31  if (errCode)
32  throw std::runtime_error(std::string("Error returned from ") + funcName);
33 }
34 #endif
std::ostream & operator<<(std::ostream &, const FT_Library)
void evalReturnCode(const int errCode, const char *funcName)
Converts a freetype return code into an exception.
Definition: util.h:30