Created
July 1, 2020 21:36
-
-
Save jerstlouis/a1fcc454baf209bb5b53d48d09839bc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename TPT> inline CPPClass & ensureTemplatized(CPPClass & _class, const char * name) | |
{ | |
if(!_class.impl || !_class.impl->templateClass) | |
{ | |
char type[1024]; | |
strcpy(type, "CPP"); | |
strcat(type, name); | |
strcat(type, "<"); | |
{ | |
const char * t1 = TypeName<TPT>::get(); | |
if(isConst<TPT>()) strcat(type, "const "); | |
strcat(type, t1); | |
} | |
strcat(type, ">"); | |
// printf("Instantiating %s\n", type); | |
_class.impl = (XClass *)eC_findClass(__thisModule, type); | |
if(_class.impl) _class.impl->bindingsClass = &_class; | |
} | |
return _class; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment