blob: 45cb4b82c280e6de8b5e75e7d8c1b521e47e0059 (
plain)
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
|
#ifndef SLANG_CORE_TYPE_CONVERT_UTIL_H
#define SLANG_CORE_TYPE_CONVERT_UTIL_H
// TODO: This file's name is not obvious for what it contains.
// Either the file should be renamed to be more obviously related
// to what it does, or (better yet) the functionality should be
// moved to reside in places that are more logically related
// to each of the given types.
//
// Also: this doesn't belong in `core` for a bunch of reasons.
#include "slang.h"
namespace Slang
{
/// Utility class for simple conversions between types
struct TypeConvertUtil
{
/// Convert a target into it's equivalent language if ones available. If not returns
/// SOURCE_LANGUAGE_UNKNOWN
static SlangSourceLanguage getSourceLanguageFromTarget(SlangCompileTarget target);
/// Convert a language into the equivalent target. If not available returns SLANG_TARGET_UNKNOWN
static SlangCompileTarget getCompileTargetFromSourceLanguage(SlangSourceLanguage lang);
};
} // namespace Slang
#endif // SLANG_CORE_TYPE_TEXT_UTIL_H
|