cairo_types.h
Go to the documentation of this file.
1 #ifndef CARTOGRAPHER_IO_CAIRO_TYPES_H_
2 #define CARTOGRAPHER_IO_CAIRO_TYPES_H_
3 
4 #include <memory>
5 
6 #include "cairo/cairo.h"
7 
8 namespace cartographer {
9 namespace io {
10 namespace cairo {
11 
12 // std::unique_ptr for Cairo surfaces. The surface is destroyed when the
13 // std::unique_ptr is reset or destroyed.
14 using UniqueSurfacePtr =
15  std::unique_ptr<cairo_surface_t, void (*)(cairo_surface_t*)>;
16 
17 // std::unique_ptr for Cairo contexts. The context is destroyed when the
18 // std::unique_ptr is reset or destroyed.
19 using UniqueContextPtr = std::unique_ptr<cairo_t, void (*)(cairo_t*)>;
20 
21 // std::unique_ptr for Cairo paths. The path is destroyed when the
22 // std::unique_ptr is reset or destroyed.
23 using UniquePathPtr = std::unique_ptr<cairo_path_t, void (*)(cairo_path_t*)>;
24 
25 } // namespace cairo
26 } // namespace io
27 } // namespace cartographer
28 
29 #endif // CARTOGRAPHER_IO_CAIRO_TYPES_H_
std::unique_ptr< cairo_t, void(*)(cairo_t *)> UniqueContextPtr
Definition: cairo_types.h:19
std::unique_ptr< cairo_path_t, void(*)(cairo_path_t *)> UniquePathPtr
Definition: cairo_types.h:23
std::unique_ptr< cairo_surface_t, void(*)(cairo_surface_t *)> UniqueSurfacePtr
Definition: cairo_types.h:15


cartographer
Author(s):
autogenerated on Wed Jun 5 2019 21:57:57