www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - compile time sequence variable

Hello, can I make AliasSeq not inside template function, for 
example I want add function called `registerComponent` which will 
add the components classes to list and based on this generated 
list I want add additional fields inside `ComponentsManager`. 
Example:
Registering components:
 struct MyComponent {
     float avg;
     string name;
 }

 struct MyComponent2 {
     string name;
     string text;
     string title;
 }

 static {
     registerComponent!(MyComponent);
     registerComponent!(MyComponent2);
 }
And my `ComponentsManager`:
 class ComponentsManager {
     // Automatically generated fields
     Array!MyComponent myComponentList;
     Array!MyComponent2 myComponent2List;

     // Other fields and methods
 }
How can I do this? furthermore I would like using `registerComponent` from different modules.
Sep 30 2017