1/*
2---------------------------------------------------------------------------
3Open Asset Import Library (assimp)
4---------------------------------------------------------------------------
5
6Copyright (c) 2006-2019, assimp team
7
8
9
10All rights reserved.
11
12Redistribution and use of this software in source and binary forms,
13with or without modification, are permitted provided that the following
14conditions are met:
15
16* Redistributions of source code must retain the above
17 copyright notice, this list of conditions and the
18 following disclaimer.
19
20* Redistributions in binary form must reproduce the above
21 copyright notice, this list of conditions and the
22 following disclaimer in the documentation and/or other
23 materials provided with the distribution.
24
25* Neither the name of the assimp team, nor the names of its
26 contributors may be used to endorse or promote products
27 derived from this software without specific prior
28 written permission of the assimp team.
29
30THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41---------------------------------------------------------------------------
42*/
43
44/** @file importerdesc.h
45 * @brief #aiImporterFlags, aiImporterDesc implementation.
46 */
47#pragma once
48#ifndef AI_IMPORTER_DESC_H_INC
49#define AI_IMPORTER_DESC_H_INC
50
51
52/** Mixed set of flags for #aiImporterDesc, indicating some features
53 * common to many importers*/
54enum aiImporterFlags
55{
56 /** Indicates that there is a textual encoding of the
57 * file format; and that it is supported.*/
58 aiImporterFlags_SupportTextFlavour = 0x1,
59
60 /** Indicates that there is a binary encoding of the
61 * file format; and that it is supported.*/
62 aiImporterFlags_SupportBinaryFlavour = 0x2,
63
64 /** Indicates that there is a compressed encoding of the
65 * file format; and that it is supported.*/
66 aiImporterFlags_SupportCompressedFlavour = 0x4,
67
68 /** Indicates that the importer reads only a very particular
69 * subset of the file format. This happens commonly for
70 * declarative or procedural formats which cannot easily
71 * be mapped to #aiScene */
72 aiImporterFlags_LimitedSupport = 0x8,
73
74 /** Indicates that the importer is highly experimental and
75 * should be used with care. This only happens for trunk
76 * (i.e. SVN) versions, experimental code is not included
77 * in releases. */
78 aiImporterFlags_Experimental = 0x10
79};
80
81
82/** Meta information about a particular importer. Importers need to fill
83 * this structure, but they can freely decide how talkative they are.
84 * A common use case for loader meta info is a user interface
85 * in which the user can choose between various import/export file
86 * formats. Building such an UI by hand means a lot of maintenance
87 * as importers/exporters are added to Assimp, so it might be useful
88 * to have a common mechanism to query some rough importer
89 * characteristics. */
90struct aiImporterDesc
91{
92 /** Full name of the importer (i.e. Blender3D importer)*/
93 const char* mName;
94
95 /** Original author (left blank if unknown or whole assimp team) */
96 const char* mAuthor;
97
98 /** Current maintainer, left blank if the author maintains */
99 const char* mMaintainer;
100
101 /** Implementation comments, i.e. unimplemented features*/
102 const char* mComments;
103
104 /** These flags indicate some characteristics common to many
105 importers. */
106 unsigned int mFlags;
107
108 /** Minimum format version that can be loaded im major.minor format,
109 both are set to 0 if there is either no version scheme
110 or if the loader doesn't care. */
111 unsigned int mMinMajor;
112 unsigned int mMinMinor;
113
114 /** Maximum format version that can be loaded im major.minor format,
115 both are set to 0 if there is either no version scheme
116 or if the loader doesn't care. Loaders that expect to be
117 forward-compatible to potential future format versions should
118 indicate zero, otherwise they should specify the current
119 maximum version.*/
120 unsigned int mMaxMajor;
121 unsigned int mMaxMinor;
122
123 /** List of file extensions this importer can handle.
124 List entries are separated by space characters.
125 All entries are lower case without a leading dot (i.e.
126 "xml dae" would be a valid value. Note that multiple
127 importers may respond to the same file extension -
128 assimp calls all importers in the order in which they
129 are registered and each importer gets the opportunity
130 to load the file until one importer "claims" the file. Apart
131 from file extension checks, importers typically use
132 other methods to quickly reject files (i.e. magic
133 words) so this does not mean that common or generic
134 file extensions such as XML would be tediously slow. */
135 const char* mFileExtensions;
136};
137
138/** \brief Returns the Importer description for a given extension.
139
140Will return a NULL-pointer if no assigned importer desc. was found for the given extension
141 \param extension [in] The extension to look for
142 \return A pointer showing to the ImporterDesc, \see aiImporterDesc.
143*/
144ASSIMP_API const C_STRUCT aiImporterDesc* aiGetImporterDesc( const char *extension );
145
146#endif // AI_IMPORTER_DESC_H_INC
147

source code of qt3d/src/3rdparty/assimp/src/include/assimp/importerdesc.h