HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ImfCheckFile.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-3-Clause
2
// Copyright (c) Contributors to the OpenEXR Project.
3
4
5
#ifndef INCLUDED_IMF_CHECKFILE_H
6
#define INCLUDED_IMF_CHECKFILE_H
7
8
#include "
ImfUtilExport.h
"
9
#include "
ImfNamespace.h
"
10
11
#include <cstddef>
12
13
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
14
15
16
//
17
// attempt to read the given file as an OpenEXR, using various OpenEXR read paths.
18
// This can be used to validate correctness of the library, when running the library
19
// with a sanitizer or memory checker, as well as checking that a file is a correct OpenEXR
20
//
21
// returns true if the file reads correctly using expected API calls, or false
22
// if an exception was thrown that indicates the file is invalid
23
//
24
// if reduceMemory is true, will avoid tests or inputs that are known to
25
// take large amounts of memory. This may hide errors within the file or library.
26
//
27
// if reduceTime is true and an error is found within the file, then future tests are reduced for speed.
28
// This may hide errors within the library.
29
//
30
//
31
32
IMFUTIL_EXPORT
bool
33
checkOpenEXRFile
(
const
char
* fileName,
34
bool
reduceMemory =
false
,
35
bool
reduceTime =
false
,
36
bool
enableCoreCheck =
false
37
);
38
39
40
//
41
// overloaded version of checkOpenEXRFile that takes a pointer to in-memory data
42
//
43
44
IMFUTIL_EXPORT
bool
45
checkOpenEXRFile
(
const
char
*
data
,
46
size_t
numBytes,
47
bool
reduceMemory =
false
,
48
bool
reduceTime =
false
,
49
bool
enableCoreCheck =
false
50
);
51
52
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
53
54
#endif
55
ImfNamespace.h
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition:
ImfNamespace.h:80
checkOpenEXRFile
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMFUTIL_EXPORT bool checkOpenEXRFile(const char *fileName, bool reduceMemory=false, bool reduceTime=false, bool enableCoreCheck=false)
IMFUTIL_EXPORT
#define IMFUTIL_EXPORT
Definition:
ImfUtilExport.h:51
ImfUtilExport.h
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition:
ImfNamespace.h:79
data
Definition:
format.h:895
OpenEXR
ImfCheckFile.h
Generated on Fri Apr 26 2024 03:14:58 for HDK by
1.8.6