You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ExtraCode declarationFile and implementationFile directives (#601)
* add ExtraCode declarationFile and implementationFile directives
* add declarationFile extracode for components
* mend
* fix pre-commit exclude
* add test for mutable declarationFile and implementationFile
* copy extra code files to root_io and sio_io for dumpmodel tests
* revert embedding files with jinja
* add including implementationFile and declarationFile during parsing
* Update .pre-commit-config.yaml
* remove checks for not yet implemented extra code, fix space
Co-authored-by: tmadlener <[email protected]>
* add documentation of file paths
* add DEPENDS option to datamodel generating macro and use it with extra code files
* Fix typo in documentation
---------
Co-authored-by: tmadlener <[email protected]>
Copy file name to clipboardexpand all lines: doc/datamodel_syntax.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -119,17 +119,17 @@ The `includes` will be add to the header files of the generated classes.
119
119
includes: <newline separated list of strings (optional)>
120
120
declaration: <string>
121
121
implementation : <string>
122
-
declarationFile: <string> (to be implemented!)
123
-
implementationFile: <string> (to be implemented!)
122
+
declarationFile: <string>
123
+
implementationFile: <string>
124
124
MutableExtraCode:
125
125
includes: <newline separated list of strings (optional)>
126
126
declaration: <string>
127
127
implementation : <string>
128
-
declarationFile: <string> (to be implemented!)
129
-
implementationFile: <string> (to be implemented!)
128
+
declarationFile: <string>
129
+
implementationFile: <string>
130
130
```
131
131
132
-
The code being provided has to use the macro `{name}` in place of the concrete name of the class.
132
+
The code being provided has to use the macro `{name}` in place of the concrete name of the class. The paths to the files given in `declarationFile` and `implementationFile` should be either absolute or relative to the datamodel yaml file. The cmake users are encouraged to specify these file via the `DEPENDS` option of `PODIO_GENERATE_DATAMODEL` to add the files as configuration dependency of the datamodel and cause the datamodel re-generation when they change.
133
133
134
134
## Definition of custom interfaces
135
135
An interface type can be defined as follows (again using an example from the example datamodel)
0 commit comments