MaterialX 1.38.2
Library.h
Go to the documentation of this file.
1//
2// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3// All rights reserved. See LICENSE.txt for license.
4//
5
6#ifndef MATERIALX_LIBRARY_H
7#define MATERIALX_LIBRARY_H
8
12
13#include <algorithm>
14#include <cstdlib>
15#include <functional>
16#include <memory>
17#include <set>
18#include <string>
19#include <unordered_map>
20#include <vector>
21
23#if defined(MATERIALX_BUILD_SHARED_LIBS)
24 #if defined(_WIN32)
25 #pragma warning(disable:4251)
26 #pragma warning(disable:4275)
27 #pragma warning(disable:4661)
28 #define MATERIALX_SYMBOL_EXPORT __declspec(dllexport)
29 #define MATERIALX_SYMBOL_IMPORT __declspec(dllimport)
30 #define MATERIALX_EXPORT_EXTERN_TEMPLATE(...) template class MATERIALX_SYMBOL_EXPORT __VA_ARGS__
31 #define MATERIALX_IMPORT_EXTERN_TEMPLATE(...) extern template class MATERIALX_SYMBOL_IMPORT __VA_ARGS__
32 #else
33 // Presently non-Windows platforms just export all symbols from
34 // shared libraries rather than using the explicit declarations.
35 #define MATERIALX_SYMBOL_EXPORT
36 #define MATERIALX_SYMBOL_IMPORT
37 #define MATERIALX_EXPORT_EXTERN_TEMPLATE(...)
38 #define MATERIALX_IMPORT_EXTERN_TEMPLATE(...)
39 #endif
40#else
41 #define MATERIALX_SYMBOL_EXPORT
42 #define MATERIALX_SYMBOL_IMPORT
43 #define MATERIALX_EXPORT_EXTERN_TEMPLATE(...)
44 #define MATERIALX_IMPORT_EXTERN_TEMPLATE(...)
45#endif
46
47namespace MaterialX
48{
49
50using std::string;
51using std::vector;
52using std::shared_ptr;
53using std::weak_ptr;
54
56using StringVec = vector<string>;
58using StringMap = std::unordered_map<string, string>;
60using StringSet = std::set<string>;
61
62} // namespace MaterialX
63
64#endif
std::set< string > StringSet
A set of strings.
Definition: Library.h:60
vector< string > StringVec
A vector of strings.
Definition: Library.h:56
std::unordered_map< string, string > StringMap
An unordered map with strings as both keys and values.
Definition: Library.h:58