MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / getIncludeFileName

Method getIncludeFileName

src/builtin/module_file_access.cpp:153–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151 }
152
153 string ModuleFileAccess::getIncludeFileName ( const string & fileName, const string & incFileName ) const {
154 if (failed() || !includeGet) return FileAccess::getIncludeFileName(fileName,incFileName);
155 vec4f args[2];
156 args[0] = cast<const char *>::from(incFileName.c_str());
157 args[1] = cast<const char *>::from(fileName.c_str());
158 vec4f res = context->evalWithCatch(includeGet, args, nullptr);
159 auto exc = context->getException(); exc;
160 DAS_ASSERTF(!exc, "exception failed in `include_get`: %s", exc);
161 auto fname = cast<const char *>::to(res);
162 return fname ? fname : "";
163 }
164
165 bool ModuleFileAccess::isSameFileName ( const string & a, const string & b ) const {
166 if (failed() || !sameFileName) return FileAccess::isSameFileName(a,b);

Callers

nothing calls this directly

Calls 4

toFunction · 0.85
evalWithCatchMethod · 0.80
failedFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected