Added GetString/Int/Double/Object(UI) functions to Service.

- These functions serve to deprecate (UI)Get and allow for reducing string translations, as well as passing in objects for maximum flexibility.
This commit is contained in:
Major Cooke 2021-07-25 15:28:15 -05:00 committed by alexey.lysiuk
parent a4c8fbcc50
commit e91485c50c

View file

@ -3,15 +3,57 @@
*/
class Service abstract
{
virtual play String Get(String request)
deprecated("4.6.1", "Use GetString() instead") virtual play String Get(String request)
{
return "";
}
virtual ui String UiGet(String request)
deprecated("4.6.1", "Use GetStringUI() instead") virtual ui String UiGet(String request)
{
return "";
}
// Play variants
virtual play String GetString(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
{
return "";
}
virtual play int GetInt(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
{
return 0;
}
virtual play double GetDouble(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
{
return 0.0;
}
virtual play Object GetObject(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
{
return null;
}
// UI variants
virtual ui String GetStringUI(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
{
return "";
}
virtual ui int GetIntUI(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
{
return 0;
}
virtual ui double GetDoubleUI(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
{
return 0.0;
}
virtual ui Object GetObjectUI(String request, string stringArg = "", int intArg = 0, double doubleArg = 0, Object objectArg = null)
{
return null;
}
}
/**