forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibrary.h
More file actions
64 lines (55 loc) · 1.99 KB
/
Library.h
File metadata and controls
64 lines (55 loc) · 1.99 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
// All rights reserved. See LICENSE.txt for license.
//
#ifndef MATERIALX_LIBRARY_H
#define MATERIALX_LIBRARY_H
/// @file
/// Library-wide includes and types. This file should be the first include for
/// any public header in the MaterialX library.
#include <algorithm>
#include <cstdlib>
#include <functional>
#include <memory>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
/// Platform-specific macros for declaring imported and exported symbols.
#if defined(MATERIALX_BUILD_SHARED_LIBS)
#if defined(_WIN32)
#pragma warning(disable : 4251)
#pragma warning(disable : 4275)
#pragma warning(disable : 4661)
#define MATERIALX_SYMBOL_EXPORT __declspec(dllexport)
#define MATERIALX_SYMBOL_IMPORT __declspec(dllimport)
#define MATERIALX_EXPORT_EXTERN_TEMPLATE(...) template class MATERIALX_SYMBOL_EXPORT __VA_ARGS__
#define MATERIALX_IMPORT_EXTERN_TEMPLATE(...) extern template class MATERIALX_SYMBOL_IMPORT __VA_ARGS__
#else
// Presently non-Windows platforms just export all symbols from
// shared libraries rather than using the explicit declarations.
#define MATERIALX_SYMBOL_EXPORT
#define MATERIALX_SYMBOL_IMPORT
#define MATERIALX_EXPORT_EXTERN_TEMPLATE(...)
#define MATERIALX_IMPORT_EXTERN_TEMPLATE(...)
#endif
#else
#define MATERIALX_SYMBOL_EXPORT
#define MATERIALX_SYMBOL_IMPORT
#define MATERIALX_EXPORT_EXTERN_TEMPLATE(...)
#define MATERIALX_IMPORT_EXTERN_TEMPLATE(...)
#endif
#include <MaterialXCore/Generated.h>
MATERIALX_NAMESPACE_BEGIN
using std::string;
using std::vector;
using std::shared_ptr;
using std::weak_ptr;
/// A vector of strings.
using StringVec = vector<string>;
/// An unordered map with strings as both keys and values.
using StringMap = std::unordered_map<string, string>;
/// A set of strings.
using StringSet = std::set<string>;
MATERIALX_NAMESPACE_END
#endif