Created
May 24, 2017 08:36
-
-
Save spoenemann/29f42642c83d9e5dea1a0e964054bc37 to your computer and use it in GitHub Desktop.
Entry method of the example code generator with tracing
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
override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { | |
val model = resource.contents.head as Model | |
val baseName = resource.baseName | |
fsa.generateTracedFile(baseName + '.h', model, ''' | |
/******************************** | |
* Header file for «resource.URI.lastSegment» | |
*/ | |
#ifndef «baseName.toUpperCase»_H | |
#define «baseName.toUpperCase»_H | |
«FOR c : model.types» | |
«generateHeader(c)» | |
«ENDFOR» | |
#endif | |
''') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment