constexpr size_t version_code_size static constexpr char version_codes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
constexpr size_t version_code_size = 7;
static constexpr char version_codes[][version_code_size] = {
"INVALI", // R_INVALID
"MC0.0", /* DWG Release 1.1 (as MicroCAD) */
"AC1.2", /* DWG Release 1.2 (as AutoCAD) */
"AC1.4", /* DWG Release 1.4 */
"AC1.50", /* DWG Release 2.0 */
"AC2.10", /* DWG Release 2.10 */
"AC1002", /* DWG Release 2.5 */
"AC1003", /* DWG Release 2.6 */
"AC1004", // R_9 DWG Release 9
"AC1006", // R_10 DWG Release 10
"AC1009", // R_11 DWG Release 11/12 (LT R1/R2)
"AC1012", // R_13 and LT95, beware of R13C3
"AC1014", // R_14
"AC1015", // R_2000 (r15)
"AC1018", // R_2004
"AC1021", // R_2007
"AC1024", // R_2010
"AC1027", // R_2013
"AC1032", // R_2018
"------" // R_AFTER
};
constexpr size_t version_codes_size = sizeof(version_codes) / sizeof(version_codes[0]);
DEBUG_BLUEPRINT_DECODER("Tasting DWG\n")
for (size_t i = 0; i < version_codes_size; ++i)
{
if (memcmp(data, version_codes, version_code_size - 1) == 0)
{
addMimeType(datainfo, *inputObj, mime_types::getMimeTypeDWG());
printType = BluePrintTypes::DWG;
return true;
}
}