LIBJXL: jxl/butteraugli_cxx.h Source File

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
14
15#ifndef JXL_BUTTERAUGLI_CXX_H_
16#define JXL_BUTTERAUGLI_CXX_H_
17
18#include <memory>
19
20#include "jxl/butteraugli.h"
21
22#if !(defined(__cplusplus) || defined(c_plusplus))
23#error "This a C++ only header. Use jxl/butteraugli.h from C sources."
24#endif
25
28 struct JxlButteraugliApiDestroyStruct {
30 void operator()(JxlButteraugliApi* api) { JxlButteraugliApiDestroy(api); }
31};
32
38typedef std::unique_ptr<JxlButteraugliApi, JxlButteraugliApiDestroyStruct>
39 JxlButteraugliApiPtr;
40
43 struct JxlButteraugliResultDestroyStruct {
45 void operator()(JxlButteraugliResult* result) {
46 JxlButteraugliResultDestroy(result);
47 }
48};
49
55typedef std::unique_ptr<JxlButteraugliResult, JxlButteraugliResultDestroyStruct>
56 JxlButteraugliResultPtr;
57
58#endif // JXL_BUTTERAUGLI_CXX_H_
59
butteraugli.h
Butteraugli API for JPEG XL.
JxlButteraugliResultPtr
std::unique_ptr< JxlButteraugliResult, JxlButteraugliResultDestroyStruct > JxlButteraugliResultPtr
Definition: butteraugli_cxx.h:56
JxlButteraugliResultDestroy
JXL_EXPORT void JxlButteraugliResultDestroy(JxlButteraugliResult *result)
JxlButteraugliApiDestroy
JXL_EXPORT void JxlButteraugliApiDestroy(JxlButteraugliApi *api)
JxlButteraugliApiPtr
std::unique_ptr< JxlButteraugliApi, JxlButteraugliApiDestroyStruct > JxlButteraugliApiPtr
Definition: butteraugli_cxx.h:39
JxlButteraugliResult
struct JxlButteraugliResultStruct JxlButteraugliResult
Definition: butteraugli.h:39
JxlButteraugliApi
struct JxlButteraugliApiStruct JxlButteraugliApi
Definition: butteraugli.h:31
JxlButteraugliApiDestroyStruct
Definition: butteraugli_cxx.h:28
JxlButteraugliApiDestroyStruct::operator()
void operator()(JxlButteraugliApi *api)
Calls JxlButteraugliApiDestroy() on the passed api.
Definition: butteraugli_cxx.h:30
JxlButteraugliResultDestroyStruct
Definition: butteraugli_cxx.h:43
JxlButteraugliResultDestroyStruct::operator()
void operator()(JxlButteraugliResult *result)
Calls JxlButteraugliResultDestroy() on the passed result object.
Definition: butteraugli_cxx.h:45