Added implementaiton for Signal's `handles(ulong)`

This commit is contained in:
Tristan B. Velloza Kildaire 2021-09-01 15:33:39 +02:00
parent e19421f4e5
commit a6aa3486ad
1 changed files with 11 additions and 1 deletions

View File

@ -25,6 +25,8 @@ public class Signal
this.handler = handler; this.handler = handler;
} }
/** /**
* Returns true if this signal handles the given typeID * Returns true if this signal handles the given typeID
* false otherwise * false otherwise
@ -32,7 +34,15 @@ public class Signal
public bool handles(ulong typeID) public bool handles(ulong typeID)
{ {
/* FIXME: Implement */ /* FIXME: Implement */
return true; foreach(ulong id; typeIDs)
{
if(id == typeID)
{
return true;
}
}
return false;
} }
public void registerTypeID(ulong typeID) public void registerTypeID(ulong typeID)