MaterialX 1.39.1
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 #define MATERIALX_SYMBOL_EXPORT __attribute__((__visibility__("default")))
36 #define MATERIALX_SYMBOL_IMPORT __attribute__((__visibility__("default")))
37 #define MATERIALX_EXPORT_EXTERN_TEMPLATE(...) template class MATERIALX_SYMBOL_EXPORT __VA_ARGS__
38 #define MATERIALX_IMPORT_EXTERN_TEMPLATE(...) extern template class MATERIALX_SYMBOL_IMPORT __VA_ARGS__
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
47MATERIALX_NAMESPACE_BEGIN
48
49using std::string;
50using std::vector;
51using std::shared_ptr;
52using std::weak_ptr;
53
55using StringVec = vector<string>;
57using StringMap = std::unordered_map<string, string>;
59using StringSet = std::set<string>;
60
61MATERIALX_NAMESPACE_END
62
63#endif
std::set< string > StringSet
A set of strings.
Definition: Library.h:59
vector< string > StringVec
A vector of strings.
Definition: Library.h:55
std::unordered_map< string, string > StringMap
An unordered map with strings as both keys and values.
Definition: Library.h:57