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

Method addTypeInfoMacro

src/ast/ast_module.cpp:478–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476 }
477
478 bool Module::addTypeInfoMacro ( TypeInfoMacro * ptr, bool canFail ) {
479 if ( typeInfoMacros.insert(make_pair(ptr->name, unique_ptr<TypeInfoMacro>(ptr))).second ) {
480 ptr->seal(this);
481 return true;
482 } else {
483 if ( !canFail ) {
484 DAS_FATAL_ERROR("can't add duplicate typeinfo macro %s to module %s\n", ptr->name.c_str(), name.c_str() );
485 }
486 return false;
487 }
488 }
489
490 bool Module::addTypeMacro ( TypeMacro * ptr, bool canFail ) {
491 if ( typeMacros.insert(make_pair(ptr->name, unique_ptr<TypeMacro>(ptr))).second ) {

Callers 1

addModuleTypeInfoMacroFunction · 0.80

Calls 3

insertMethod · 0.45
sealMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected