MaterialX 1.38.10
Loading...
Searching...
No Matches
Library.h
Go to the documentation of this file.
1//
2// Copyright Contributors to the MaterialX Project
3// SPDX-License-Identifier: Apache-2.0
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
22#include <MaterialXCore/Generated.h>
23
25#if defined(MATERIALX_BUILD_SHARED_LIBS)
26 #if defined(_WIN32)
27 #pragma warning(disable : 4251)
28 #pragma warning(disable : 4275)
29 #pragma warning(disable : 4661)
30 #define MATERIALX_SYMBOL_EXPORT __declspec(dllexport)
31 #define MATERIALX_SYMBOL_IMPORT __declspec(dllimport)
32 #define MATERIALX_EXPORT_EXTERN_TEMPLATE(...) template class MATERIALX_SYMBOL_EXPORT __VA_ARGS__
33 #define MATERIALX_IMPORT_EXTERN_TEMPLATE(...) extern template class MATERIALX_SYMBOL_IMPORT __VA_ARGS__
34 #else
35 // Presently non-Windows platforms just export all symbols from
36 // shared libraries rather than using the explicit declarations.
37 #define MATERIALX_SYMBOL_EXPORT
38 #define MATERIALX_SYMBOL_IMPORT
39 #define MATERIALX_EXPORT_EXTERN_TEMPLATE(...)
40 #define MATERIALX_IMPORT_EXTERN_TEMPLATE(...)
41 #endif
42#else
43 #define MATERIALX_SYMBOL_EXPORT
44 #define MATERIALX_SYMBOL_IMPORT
45 #define MATERIALX_EXPORT_EXTERN_TEMPLATE(...)
46 #define MATERIALX_IMPORT_EXTERN_TEMPLATE(...)
47#endif
48
49MATERIALX_NAMESPACE_BEGIN
50
51using std::string;
52using std::vector;
53using std::shared_ptr;
54using std::weak_ptr;
55
57using StringVec = vector<string>;
59using StringMap = std::unordered_map<string, string>;
61using StringSet = std::set<string>;
62
63MATERIALX_NAMESPACE_END
64
65#endif
std::set< string > StringSet
A set of strings.
Definition: Library.h:61
vector< string > StringVec
A vector of strings.
Definition: Library.h:57
std::unordered_map< string, string > StringMap
An unordered map with strings as both keys and values.
Definition: Library.h:59