butteraugli_cxx.h
Go to the documentation of this file.
// Copyright (c) the JPEG XL Project Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef JXL_BUTTERAUGLI_CXX_H_
#define JXL_BUTTERAUGLI_CXX_H_
#include <memory>
#include "jxl/butteraugli.h"
#if !(defined(__cplusplus) || defined(c_plusplus))
#error "This a C++ only header. Use jxl/butteraugli.h from C sources."
#endif
struct JxlButteraugliApiDestroyStruct {
void operator()(JxlButteraugliApi* api) { JxlButteraugliApiDestroy(api); }
};
typedef std::unique_ptr<JxlButteraugliApi, JxlButteraugliApiDestroyStruct>
JxlButteraugliApiPtr;
struct JxlButteraugliResultDestroyStruct {
void operator()(JxlButteraugliResult* result) {
JxlButteraugliResultDestroy(result);
}
};
typedef std::unique_ptr<JxlButteraugliResult, JxlButteraugliResultDestroyStruct>
JxlButteraugliResultPtr;
#endif // JXL_BUTTERAUGLI_CXX_H_
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