https://github.com/bastianblokland/typedtree-generator-dotnet
Cli tool for generating 'treescheme' files based on dotnet assemblies.
https://github.com/bastianblokland/typedtree-generator-dotnet
behaviour-tree descision-tree json-tree tree-editor
Last synced: about 1 month ago
JSON representation
Cli tool for generating 'treescheme' files based on dotnet assemblies.
- Host: GitHub
- URL: https://github.com/bastianblokland/typedtree-generator-dotnet
- Owner: BastianBlokland
- License: mit
- Created: 2019-03-24T13:08:53.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T04:26:19.000Z (over 2 years ago)
- Last Synced: 2025-02-13T22:45:02.056Z (3 months ago)
- Topics: behaviour-tree, descision-tree, json-tree, tree-editor
- Language: C#
- Homepage: https://bastian.tech/tree
- Size: 162 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TypedTree-Generator-Dotnet
[](https://dev.azure.com/bastian-blokland/TypedTree/_build/latest?definitionId=4&branchName=master)
[](https://dev.azure.com/bastian-blokland/TypedTree/_build/latest?definitionId=4&branchName=master)
[](https://codecov.io/gh/BastianBlokland/typedtree-generator-dotnet)
[](LICENSE)| Cli tool | Global tool | Core library |
|----------|-------------|--------------|
| [](https://www.nuget.org/packages/TypedTree.Generator.Cli/) | [](https://www.nuget.org/packages/TypedTree.Generator.GlobalTool/) | [](https://www.nuget.org/packages/TypedTree.Generator.Core/) |Dotnet cli tool for generating treescheme files for use in the [**TypedTree-editor**](https://github.com/bastianblokland/typedtree-editor)
## Description
To avoid having to handwrite treescheme files you can generate them based on the dotnet class
structure of your tree (for example a behaviour tree).## Usage
There are 3 different ways to use the generator:| Usecase | Project | Documentation |
|---------|---------|---------------|
| Build integration | [**Cli**](https://www.nuget.org/packages/TypedTree.Generator.Cli/) | [Cli Readme](https://github.com/BastianBlokland/typedtree-generator-dotnet/tree/master/src/TypedTree.Generator.Cli/readme.md) |
| Command line | [**GlobalTool**](https://www.nuget.org/packages/TypedTree.Generator.GlobalTool/) | [GlobalTool Readme](https://github.com/BastianBlokland/typedtree-generator-dotnet/tree/master/src/TypedTree.Generator.GlobalTool/readme.md) |
| Manual library integration | [**Core**](https://www.nuget.org/packages/TypedTree.Generator.Core/) | [Core Readme](https://github.com/BastianBlokland/typedtree-generator-dotnet/tree/master/src/TypedTree.Generator.Core/readme.md) |## Example
An example can be found in the [**example**](https://github.com/BastianBlokland/typedtree-generator-dotnet/tree/master/example) directory.## Supported types
### Primitives
| Dotnet type | Treescheme type | Comments |
|-------------|-----------------|----------|
| `string` | String | |
| `bool` | Boolean | |
| `byte` | Number | Scheme does **not** have any guards to keep value in bounds |
| `sbyte` | Number | Scheme does **not** have any guards to keep value in bounds |
| `short` | Number | Scheme does **not** have any guards to keep value in bounds |
| `ushort` | Number | Scheme does **not** have any guards to keep value in bounds |
| `int` | Number | Scheme does **not** have any guards to keep value in bounds |
| `uint` | Number | Scheme does **not** have any guards to keep value in bounds |
| `long` | Number | Scheme does **not** have any guards to keep value in bounds |
| `ulong` | Number | Scheme does **not** have any guards to keep value in bounds |
| `float` | Number | Scheme does **not** have any guards to keep value in bounds |
| `double` | Number | Scheme does **not** have any guards to keep value in bounds |### Enums
| Dotnet type | Treescheme type | Comments |
|-------------|-----------------|----------|
| Custom `enum` | Enum | Value of enum has to be convertible to a int |### Classes
| Dotnet type | Treescheme type | Comments |
|-------------|-----------------|----------|
| Custom `class` | Node | Fields are found based on the provided `FieldSource` |
| Custom `struct` | Node | Fields are found based on the provided `FieldSource` |### References
When a field references a `class` / `struct` / `interface`| Dotnet type | Treescheme type | Comments |
|-------------|-----------------|----------|
| `class` | Alias | |
| `struct` | Alias | |
| `interface` | Alias | |### Collections
| Dotnet type | Treescheme type | Comments |
|-------------|-----------------|----------|
| `T[]` | Array | |
| `IReadOnlyList` | Array | |
| `IReadOnlyCollection` | Array | |
| `ICollection` | Array | |
| `IList` | Array | |