LIBJXL

butteraugli_cxx.h
Go to the documentation of this file.
1// Copyright (c) the JPEG XL Project Authors. All rights reserved.
2//
3// Use of this source code is governed by a BSD-style
4// license that can be found in the LICENSE file.
5
11
12#ifndef JXL_BUTTERAUGLI_CXX_H_
13#define JXL_BUTTERAUGLI_CXX_H_
14
15#include <memory>
16
17#include "jxl/butteraugli.h"
18
19#if !(defined(__cplusplus) || defined(c_plusplus))
20#error "This a C++ only header. Use jxl/butteraugli.h from C sources."
21#endif
22
25 struct JxlButteraugliApiDestroyStruct {
27 void operator()(JxlButteraugliApi* api) { JxlButteraugliApiDestroy(api); }
28};
29
35 typedef std::unique_ptr<JxlButteraugliApi, JxlButteraugliApiDestroyStruct>
36 JxlButteraugliApiPtr;
37
40 struct JxlButteraugliResultDestroyStruct {
42 void operator()(JxlButteraugliResult* result) {
43 JxlButteraugliResultDestroy(result);
44 }
45};
46
52 typedef std::unique_ptr<JxlButteraugliResult, JxlButteraugliResultDestroyStruct>
53 JxlButteraugliResultPtr;
54
55#endif // JXL_BUTTERAUGLI_CXX_H_
butteraugli.h
Butteraugli API for JPEG XL.
JxlButteraugliResultDestroy
JXL_EXPORT void JxlButteraugliResultDestroy(JxlButteraugliResult *result)
JxlButteraugliApiDestroy
JXL_EXPORT void JxlButteraugliApiDestroy(JxlButteraugliApi *api)
JxlButteraugliResult
struct JxlButteraugliResultStruct JxlButteraugliResult
Definition: butteraugli.h:37
JxlButteraugliApi
struct JxlButteraugliApiStruct JxlButteraugliApi
Definition: butteraugli.h:29
JxlButteraugliResultPtr
std::unique_ptr< JxlButteraugliResult, JxlButteraugliResultDestroyStruct > JxlButteraugliResultPtr
Definition: butteraugli_cxx.h:53
JxlButteraugliApiPtr
std::unique_ptr< JxlButteraugliApi, JxlButteraugliApiDestroyStruct > JxlButteraugliApiPtr
Definition: butteraugli_cxx.h:36
JxlButteraugliApiDestroyStruct
Definition: butteraugli_cxx.h:25
JxlButteraugliApiDestroyStruct::operator()
void operator()(JxlButteraugliApi *api)
Calls JxlButteraugliApiDestroy() on the passed api.
Definition: butteraugli_cxx.h:27
JxlButteraugliResultDestroyStruct
Definition: butteraugli_cxx.h:40
JxlButteraugliResultDestroyStruct::operator()
void operator()(JxlButteraugliResult *result)
Calls JxlButteraugliResultDestroy() on the passed result object.
Definition: butteraugli_cxx.h:42