Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 |
/** * Copyright 1998-2011 Epic Games, Inc. All Rights Reserved. */ /** * Stats class that accumulates the stats data before submitting it to the * online subsytem for storage. */ class OnlineStatsWrite extends OnlineStats native abstract; /** Maps the stat's column num to the human readable stat name */ var const array<StringIdToStringMapping> StatMappings; /** The array of properties to publish to the stats view */ var const array<SettingsProperty> Properties; /** This array contains the list of views to write the properties to */ var array<int> ViewIds; /** This array contains the list of views to write the properties to for arbitrated matches */ var array<int> ArbitratedViewIds; /** This is the property id that is used to rate on */ var const int RatingId; /** * Delegate used to notify the caller when stats write has completed */ delegate OnStatsWriteComplete(); cpptext { /** * Finds the specified stat in the property list * * @param StatId the stat to search for * * @return pointer to the stat or NULL if not found */ FORCEINLINE FSettingsData* FindStat(INT StatId) { // Search for the individual stat for (INT PropertyIndex = 0; PropertyIndex < Properties.Num(); ++PropertyIndex) { FSettingsProperty& Stat = Properties(PropertyIndex); if (Stat.PropertyId == StatId) { return &Stat.Data; } } return NULL; } } /** * Searches the stat mappings to find the stat id that matches the name * * @param StatName the name of the stat being searched for * @param StatId the out value that gets the id * * @return true if it was found, false otherwise */ native function bool GetStatId(name StatName,out int StatId); /** * Searches the stat mappings to find human readable name for the stat id * * @param StatId the id of the stats to find the name for * * @return true if it was found, false otherwise */ native function name GetStatName(int StatId); /** * Sets a stat of type SDT_Float to the value specified. Does nothing * if the stat is not of the right type. * * @param StatId the stat to change the value of * @param Value the new value to assign to the stat */ native function SetFloatStat(int StatId,float Value); /** * Sets a stat of type SDT_Int to the value specified. Does nothing * if the stat is not of the right type. * * @param StatId the stat to change the value of * @param Value the new value to assign to the stat */ native function SetIntStat(int StatId,int Value); /** * Increments a stat of type SDT_Float by the value specified. Does nothing * if the stat is not of the right type. * * @param StatId the stat to increment * @param IncBy the value to increment by */ native function IncrementFloatStat(int StatId,optional float IncBy = 1.0); /** * Increments a stat of type SDT_Int by the value specified. Does nothing * if the stat is not of the right type. * * @param StatId the stat to increment * @param IncBy the value to increment by */ native function IncrementIntStat(int StatId,optional int IncBy = 1); /** * Decrements a stat of type SDT_Float by the value specified. Does nothing * if the stat is not of the right type. * * @param StatId the stat to decrement * @param DecBy the value to decrement by */ native function DecrementFloatStat(int StatId,optional float DecBy = 1.0); /** * Decrements a stat of type SDT_Int by the value specified. Does nothing * if the stat is not of the right type. * * @param StatId the stat to decrement * @param DecBy the value to decrement by */ native function DecrementIntStat(int StatId,optional int DecBy = 1); |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |