Improve fullName template
fullName now support multi-pararmeter templates
This commit is contained in:
parent
6a600d22c8
commit
1a5452d6cc
3 changed files with 43 additions and 6 deletions
24
tests/bugs.d
24
tests/bugs.d
|
|
@ -177,6 +177,7 @@ unittest
|
|||
@("3-template-system-compilation-file")
|
||||
unittest
|
||||
{
|
||||
|
||||
struct TemplateSystem(T)
|
||||
{
|
||||
struct EntitiesData
|
||||
|
|
@ -184,14 +185,31 @@ unittest
|
|||
uint length;
|
||||
}
|
||||
|
||||
uint a;
|
||||
uint b;
|
||||
T a;
|
||||
}
|
||||
|
||||
struct TemplateSystem2(T, T2, T3)
|
||||
{
|
||||
struct EntitiesData
|
||||
{
|
||||
uint length;
|
||||
}
|
||||
|
||||
T a;
|
||||
T2 b;
|
||||
T3 c;
|
||||
}
|
||||
|
||||
struct TempalteComponent(T)
|
||||
{
|
||||
T parameter;
|
||||
}
|
||||
|
||||
struct TempalteComponent2(T, T2)
|
||||
{
|
||||
T parameter;
|
||||
T2 parameter2;
|
||||
}
|
||||
|
||||
gEntityManager.initialize(0);
|
||||
|
||||
|
|
@ -199,7 +217,9 @@ unittest
|
|||
|
||||
gEntityManager.registerComponent!CInt;
|
||||
gEntityManager.registerComponent!(TempalteComponent!uint);
|
||||
gEntityManager.registerComponent!(TempalteComponent2!(float,int));
|
||||
gEntityManager.registerSystem!(TemplateSystem!CInt)(0);
|
||||
gEntityManager.registerSystem!(TemplateSystem2!(CInt, uint, float))(0);
|
||||
|
||||
gEntityManager.endRegister();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue