BGC Tools
|
Data Structures | |
class | DataKeys |
Public Member Functions | |
delegate void | MigrateProtocols (ref JsonObject protocols) |
delegate void | SessionElementOverrun () |
delegate void | PrepareNextElement (bool resuming) |
delegate SessionElement | ParseSessionElement (JsonObject sessionElement) |
Static Public Member Functions | |
static void | PrepareProtocol (string protocolName, int protocolID) |
static ProtocolStatus | TryUpdateProtocol (string protocolName, int protocolID, int sessionIndex, int sessionElementIndex=0) |
static ProtocolStatus | SetSession (int session, int element=0) |
static JsonValue | GetEnvValue (string key, JsonValue defaultReturn=default(JsonValue)) |
static bool | GetEnvBool (string key, bool defaultValue=false) |
static int | GetEnvInt (string key, int defaultValue=0) |
static string | GetEnvStr (string key, string defaultValue="") |
static float | GetEnvFloat (string key, float defaultValue=0f) |
static void | RegisterSpecializers (SessionElementOverrun sessionElementOverrun, PrepareNextElement prepareNextElement, ParseSessionElement parseSessionElement, MigrateProtocols migrateProtocols) |
static ProtocolStatus | ExecuteNextElement (bool resuming=false) |
static void | SaveAs (string protocolName) |
static void | SerializeAll () |
static bool | LoadProtocolSet (string protocolName) |
static JsonArray | SerializeProtocols () |
static void | DeserializeProtocols (JsonArray protocols) |
static JsonArray | SerializeSessions () |
static void | DeserializeSessions (JsonArray sessions) |
static JsonArray | SerializeSessionElements () |
static void | DeserializeSessionElements (JsonArray elements) |
static void | UpdateDefaults () |
static string | GetProtocolName (int protocolID) |
static void | HardClearAll () |
Data Fields | |
const int | protocolDataVersion = 2 |
Static Public Attributes | |
static Dictionary< int, Protocol > | protocolDictionary = new Dictionary<int, Protocol>() |
static Dictionary< int, Session > | sessionDictionary = new Dictionary<int, Session>() |
static Dictionary< int, SessionElement > | sessionElementDictionary |
static Protocol | currentProtocol = null |
static Session | currentSession = null |
static SessionElement | currentSessionElement = null |
static int | nextSessionElementIndex = -1 |
Properties | |
static int | ElementNumber [get, set] |
static int | SessionNumber [get, set] |
static bool | SessionInProgress [get, set] |
Static Private Member Functions | |
static void | RemoveRedundancies () |
Private Attributes | |
const string | protocolDataDir = "Protocols" |
Static Private Attributes | |
static string | loadedProtocol = "" |
static SessionElementOverrun | sessionElementOverrun = null |
static PrepareNextElement | prepareNextElement = null |
static MigrateProtocols | migrateProtocols = null |
static ParseSessionElement | parseSessionElement = null |
Definition at line 21 of file ProtocolManager.cs.
|
inlinestatic |
Definition at line 471 of file ProtocolManager.cs.
References BGC.Study.ProtocolKeys.Protocol.EnvironmentValues, BGC.Study.ProtocolKeys.Protocol.Id, and BGC.Study.ProtocolKeys.Protocol.SessionIDs.
|
inlinestatic |
Definition at line 540 of file ProtocolManager.cs.
References BGC.Study.SessionElement.id.
|
inlinestatic |
Definition at line 516 of file ProtocolManager.cs.
References BGC.Study.Session.id.
|
inlinestatic |
Definition at line 251 of file ProtocolManager.cs.
References BGC.Study.SessionElement.CleanupElement(), BGC.Study.Session.Count, BGC.Study.SessionElement.ExecuteElement(), and BGC.Users.PlayerData.Save().
|
inlinestatic |
Definition at line 181 of file ProtocolManager.cs.
References LightJson.JsonValue.AsBoolean, LightJson.JsonValue.AsInteger, LightJson.JsonValue.IsBoolean, and LightJson.JsonValue.IsInteger.
|
inlinestatic |
Definition at line 226 of file ProtocolManager.cs.
References LightJson.JsonValue.AsNumber, and LightJson.JsonValue.IsNumber.
|
inlinestatic |
Definition at line 200 of file ProtocolManager.cs.
References LightJson.JsonValue.AsInteger, and LightJson.JsonValue.IsInteger.
|
inlinestatic |
Definition at line 213 of file ProtocolManager.cs.
References LightJson.JsonValue.AsString, and LightJson.JsonValue.IsString.
|
inlinestatic |
Definition at line 153 of file ProtocolManager.cs.
References LightJson.JsonObject.ContainsKey(), BGC.Study.SessionElement.envVals, BGC.Study.Protocol.envVals, and BGC.Study.Session.envVals.
|
inlinestatic |
Definition at line 570 of file ProtocolManager.cs.
|
inlinestatic |
Definition at line 580 of file ProtocolManager.cs.
References BGC.Study.Protocol.HardClear(), BGC.Study.SessionElement.HardClear(), and BGC.Study.Session.HardClear().
|
inlinestatic |
Definition at line 402 of file ProtocolManager.cs.
References BGC.IO.DataManagement.PathForDataDirectory(), BGC.Study.ProtocolKeys.Protocols, BGC.IO.FileReader.ReadJsonFile(), BGC.Study.ProtocolKeys.SessionElements, and BGC.Study.ProtocolKeys.Sessions.
delegate void BGC.Study.ProtocolManager.MigrateProtocols | ( | ref JsonObject | protocols | ) |
delegate SessionElement BGC.Study.ProtocolManager.ParseSessionElement | ( | JsonObject | sessionElement | ) |
delegate void BGC.Study.ProtocolManager.PrepareNextElement | ( | bool | resuming | ) |
|
inlinestatic |
Definition at line 74 of file ProtocolManager.cs.
|
inlinestatic |
Definition at line 239 of file ProtocolManager.cs.
References BGC.Study.ProtocolManager.migrateProtocols, BGC.Study.ProtocolManager.parseSessionElement, BGC.Study.ProtocolManager.prepareNextElement, and BGC.Study.ProtocolManager.sessionElementOverrun.
|
inlinestaticprivate |
Definition at line 298 of file ProtocolManager.cs.
References BGC.Study.ProtocolKeys.Session.Id, BGC.Study.ProtocolKeys.SessionElement.Id, LightJson.JsonObject.Remove(), and LightJson.JsonObject.ToString().
|
inlinestatic |
Definition at line 291 of file ProtocolManager.cs.
|
inlinestatic |
Definition at line 382 of file ProtocolManager.cs.
References BGC.IO.DataManagement.PathForDataDirectory(), BGC.Study.ProtocolKeys.Protocols, BGC.Study.ProtocolKeys.SessionElements, BGC.Study.ProtocolKeys.Sessions, BGC.Study.ProtocolKeys.Version, and BGC.IO.FileWriter.WriteJson().
|
inlinestatic |
Definition at line 441 of file ProtocolManager.cs.
References LightJson.JsonObject.Add(), LightJson.JsonObject.Count, BGC.Study.ProtocolKeys.Protocol.EnvironmentValues, BGC.Study.Protocol.envVals, BGC.Study.Protocol.id, BGC.Study.ProtocolKeys.Protocol.Id, BGC.Study.SessionID.id, BGC.Study.Protocol.name, BGC.Study.ProtocolKeys.Protocol.Name, BGC.Study.ProtocolKeys.Protocol.SessionIDs, and BGC.Study.Protocol.sessions.
|
inlinestatic |
Definition at line 528 of file ProtocolManager.cs.
References BGC.Study.SessionElement.SerializeElement().
|
inlinestatic |
Definition at line 504 of file ProtocolManager.cs.
References BGC.Study.Session.SerializeSession().
delegate void BGC.Study.ProtocolManager.SessionElementOverrun | ( | ) |
|
inlinestatic |
Definition at line 118 of file ProtocolManager.cs.
References BGC.Study.Protocol.Count, BGC.Study.Session.Count, and BGC.Study.Protocol.id.
|
inlinestatic |
Definition at line 94 of file ProtocolManager.cs.
|
inlinestatic |
Definition at line 558 of file ProtocolManager.cs.
References BGC.IO.FileExtensions.AddJsonExtension(), and BGC.IO.DataManagement.PathForDataDirectory().
|
static |
Definition at line 40 of file ProtocolManager.cs.
|
static |
Definition at line 41 of file ProtocolManager.cs.
|
static |
Definition at line 42 of file ProtocolManager.cs.
|
staticprivate |
Definition at line 26 of file ProtocolManager.cs.
|
staticprivate |
Definition at line 71 of file ProtocolManager.cs.
Referenced by BGC.Study.ProtocolManager.RegisterSpecializers().
|
static |
Definition at line 44 of file ProtocolManager.cs.
|
staticprivate |
Definition at line 72 of file ProtocolManager.cs.
Referenced by BGC.Study.ProtocolManager.RegisterSpecializers().
|
staticprivate |
Definition at line 70 of file ProtocolManager.cs.
Referenced by BGC.Study.ProtocolManager.RegisterSpecializers().
|
private |
Definition at line 23 of file ProtocolManager.cs.
const int BGC.Study.ProtocolManager.protocolDataVersion = 2 |
Definition at line 24 of file ProtocolManager.cs.
|
static |
Definition at line 35 of file ProtocolManager.cs.
Referenced by BGC.Study.Protocol.Protocol().
|
static |
Definition at line 36 of file ProtocolManager.cs.
Referenced by BGC.Study.Session.Session().
|
static |
Definition at line 37 of file ProtocolManager.cs.
Referenced by BGC.Study.SessionElement.SessionElement().
|
staticprivate |
Definition at line 69 of file ProtocolManager.cs.
Referenced by BGC.Study.ProtocolManager.RegisterSpecializers().
|
staticgetset |
Definition at line 47 of file ProtocolManager.cs.
|
staticgetset |
Definition at line 59 of file ProtocolManager.cs.
|
staticgetset |
Definition at line 53 of file ProtocolManager.cs.