mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-13 22:42:07 +00:00
Add data-scoped getters for Services
This commit is contained in:
parent
590475a8e3
commit
d6e72b5264
1 changed files with 21 additions and 0 deletions
|
@ -54,6 +54,27 @@ class Service abstract
|
|||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// data/clearscope variants
|
||||
virtual clearscope String GetStringData(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
virtual clearscope int GetIntData(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual clearscope double GetDoubleData(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
virtual clearscope Object GetObjectData(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
static Service Find(class<Service> serviceName){
|
||||
return AllServices.GetIfExists(serviceName.GetClassName());
|
||||
|
|
Loading…
Reference in a new issue