MDL SDK API nvidia_logo_transpbg.gif Up
imdl_archive_api.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IMDL_ARCHIVE_API_H
8#define MI_NEURAYLIB_IMDL_ARCHIVE_API_H
9
11
12namespace mi {
13
14class IArray;
15
16namespace neuraylib {
17
18class IManifest;
19class IReader;
20
26class IMdl_archive_api : public
27 mi::base::Interface_declare<0x4b41b483,0xdb0b,0x4658,0xaf,0x65,0x64,0xb1,0xd6,0x9d,0x26,0xb0>
28{
29public:
54 const char* directory, const char* archive, const IArray* manifest_fields) = 0;
55
65 virtual Sint32 extract_archive( const char* archive, const char* directory) = 0;
66
68 virtual const IManifest* get_manifest( const char* archive) = 0;
69
81 virtual IReader* get_file( const char* archive, const char* filename) = 0;
82
95 virtual IReader* get_file(const char* filename) = 0;
96
103 virtual Sint32 set_extensions_for_compression( const char* extensions) = 0;
104
106 virtual const char* get_extensions_for_compression() const = 0;
107};
108
110class IManifest : public
111 mi::base::Interface_declare<0x9849828e,0xc383,0x4b6b,0x9f,0x49,0xdf,0xf0,0x1f,0xc7,0xe8,0xd7>
112{
113public:
115 virtual Size get_number_of_fields() const = 0;
116
118 virtual const char* get_key( Size index) const = 0;
119
121 virtual const char* get_value( Size index) const = 0;
122
124 virtual Size get_number_of_fields( const char* key) const = 0;
125
128 virtual const char* get_value( const char* key, Size index) const = 0;
129};
130 // end group mi_neuray_mdl_misc
132
133} // namespace neuraylib
134
135} // namespace mi
136
137#endif // MI_NEURAYLIB_IMDL_ARCHIVE_API_H
This interface represents static arrays, i.e., arrays with a fixed number of elements.
Definition: iarray.h:37
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Represents the manifest in an MDL archive.
Definition: imdl_archive_api.h:112
virtual const char * get_key(Size index) const =0
Returns the key of the index -th field, or NULL if index is out of bounds.
virtual const char * get_value(const char *key, Size index) const =0
Returns the value of the index -th field with the given key, or NULL if index is out of bounds.
virtual Size get_number_of_fields() const =0
Returns the number of fields.
virtual Size get_number_of_fields(const char *key) const =0
Returns the number of fields with the given key.
virtual const char * get_value(Size index) const =0
Returns the value of the index -th field, or NULL if index is out of bounds.
This API component provides functionality related to MDL archives.
Definition: imdl_archive_api.h:28
virtual const char * get_extensions_for_compression() const =0
Returns the file types to be compressed in archives.
virtual const IManifest * get_manifest(const char *archive)=0
Returns the manifest for an MDL archive, or NULL in case of failure.
virtual Sint32 create_archive(const char *directory, const char *archive, const IArray *manifest_fields)=0
Creates an MDL archive given a directory.
virtual Sint32 set_extensions_for_compression(const char *extensions)=0
Sets the file types to be compressed in archives.
virtual Sint32 extract_archive(const char *archive, const char *directory)=0
Unpacks an MDL archive into a given directory.
virtual IReader * get_file(const char *archive, const char *filename)=0
Returns an arbitrary file from an MDL archive.
virtual IReader * get_file(const char *filename)=0
Returns an arbitrary file from an MDL archive.
A reader supports binary block reads and string-oriented line reads that zero-terminate the result.
Definition: ireader.h:27
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5