HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImfMultiPartInputFile.h
Go to the documentation of this file.
1 //
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Copyright (c) Contributors to the OpenEXR Project.
4 //
5 
6 #ifndef IMFMULTIPARTINPUTFILE_H_
7 #define IMFMULTIPARTINPUTFILE_H_
8 
9 #include "ImfForward.h"
10 
11 #include "ImfGenericInputFile.h"
12 #include "ImfThreading.h"
13 
15 
17 {
18 public:
21  const char fileName[],
22  int numThreads = globalThreadCount (),
23  bool reconstructChunkOffsetTable = true);
24 
27  IStream& is,
28  int numThreads = globalThreadCount (),
29  bool reconstructChunkOffsetTable = true);
30 
32  virtual ~MultiPartInputFile ();
33 
34  // ----------------------
35  // Count of number of parts in file
36  // ---------------------
38  int parts () const;
39 
40  //----------------------
41  // Access to the headers
42  //----------------------
43 
45  const Header& header (int n) const;
46 
47  //----------------------------------
48  // Access to the file format version
49  //----------------------------------
50 
52  int version () const;
53 
54  // =----------------------------------------
55  // Check whether the entire chunk offset
56  // table for the part is written correctly
57  // -----------------------------------------
59  bool partComplete (int part) const;
60 
61  // ----------------------------------------
62  // Flush internal part cache
63  // Invalidates all 'Part' types previously
64  // constructed from this file
65  // Intended for test purposes, but can be
66  // used to temporarily reduce memory overhead,
67  // or to switch between types (e.g. TiledInputPart
68  // or DeepScanLineInputPart to InputPart)
69  // ----------------------------------------
70 
72  void flushPartCache ();
73  struct IMF_HIDDEN Data;
74 
75 private:
76  Data* _data;
77 
78  MultiPartInputFile (const MultiPartInputFile&) = delete;
79  MultiPartInputFile& operator= (const MultiPartInputFile&) = delete;
80  MultiPartInputFile (MultiPartInputFile&&) = delete;
81  MultiPartInputFile& operator= (MultiPartInputFile&&) = delete;
82 
83  //
84  // used internally by 'Part' types to access individual parts of the multipart file
85  //
86  template <class T> IMF_HIDDEN T* getInputPart (int partNumber);
87  IMF_HIDDEN InputPartData* getPart (int);
88 
89  IMF_HIDDEN void initialize ();
90 
91  friend class InputPart;
92  friend class ScanLineInputPart;
93  friend class TiledInputPart;
94  friend class DeepScanLineInputPart;
95  friend class DeepTiledInputPart;
96 
97  //
98  // For backward compatibility.
99  //
100 
101  friend class InputFile;
102  friend class TiledInputFile;
103  friend class ScanLineInputFile;
104  friend class DeepScanLineInputFile;
105  friend class DeepTiledInputFile;
106 };
107 
109 
110 #endif /* IMFMULTIPARTINPUTFILE_H_ */
Definition: ImfIO.h:26
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition: ImfNamespace.h:83
class IMF_EXPORT_TYPE MultiPartInputFile
Definition: ImfForward.h:51
#define IMF_HIDDEN
Definition: ImfExport.h:55
GLdouble n
Definition: glcorearb.h:2008
#define IMF_EXPORT
Definition: ImfExport.h:54
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition: logging.h:294
GT_API const UT_StringHolder version
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMF_EXPORT int globalThreadCount()
LeafData & operator=(const LeafData &)=delete
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition: ImfNamespace.h:80
class IMF_EXPORT_TYPE ScanLineInputFile
Definition: ImfForward.h:35
#define IMF_EXPORT_TYPE
Definition: ImfExport.h:57