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

Function addCtorAndUsing

include/daScript/ast/ast_interop.h:415–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413
414 template <typename CType, typename ...Args>
415 inline auto addCtorAndUsing ( Module & mod, const ModuleLibrary & lib, const char * name, const char * cppName ) {
416 auto fn = new BuiltIn_PlacementNew<CType,Args...>(name,lib,cppName);
417 DAS_ASSERT(fn->result->isRefType() && "can't add ctor to by-value types");
418 mod.addFunction(fn);
419 mod.addFunction(new BuiltIn_Using<CType,Args...>(lib,cppName));
420 return fn;
421 }
422
423 template <typename CType, typename IType> // this is for the multiple inheritance
424 void with_interface ( CType & shape, const TBlock<void,IType> & block, Context * context, LineInfoArg * at ) {

Callers

nothing calls this directly

Calls 2

isRefTypeMethod · 0.45
addFunctionMethod · 0.45

Tested by

no test coverage detected