public void setModifierName(TypeModifierNameKnownValues new_value) { TypeModifierName new_full_value = new TypeModifierName(); Debug.Assert(new_value != TypeModifierNameKnownValues.ModifierName__none); new_full_value.in_known_list = true; new_full_value.list_value = new_value; setModifierName(new_full_value); }
public string getModifierNameAsString() { TypeModifierName result = getModifierName(); if (result.in_known_list) { return(stringFromModifierName(result.list_value)); } else { return(result.string_value); } }
protected override void handle_result(string result) { TypeModifierNameKnownValues known = stringToModifierName(result); TypeModifierName new_value = new TypeModifierName(); if (known == TypeModifierNameKnownValues.ModifierName__none) { new_value.in_known_list = false; new_value.string_value = result; } else { new_value.in_known_list = true; new_value.list_value = known; } handle_result(new_value); }
public void setModifierName(string chars) { TypeModifierNameKnownValues known = stringToModifierName(chars); TypeModifierName new_value = new TypeModifierName(); if (known == TypeModifierNameKnownValues.ModifierName__none) { new_value.in_known_list = false; new_value.string_value = chars; } else { new_value.in_known_list = true; new_value.list_value = known; } setModifierName(new_value); }
protected override void handle_result(TypeModifierName result) { top.value.Add(result); }
protected override void handle_result(TypeModifierName result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(TypeModifierName result);
public void setModifierName(TypeModifierName new_value) { flagHasModifierName = true; storeModifierName = new_value; }
private void fromJSONModifierName(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); JSONStringValue json_string = json_value.string_value(); if (json_string == null) { throw new Exception("The value for field ModifierName of SportsStatsArgumentTypeModifierJSON is not a string."); } TypeModifierName the_open_enum = new TypeModifierName(); switch (json_string.getData()[0]) { case 'N': if (String.Compare(json_string.getData(), 1, "HL", 0, 2, false) == 0) { switch (json_string.getData()[3]) { case 'E': switch (json_string.getData()[4]) { case 'm': if ((String.Compare(json_string.getData(), 5, "ptyNet", 0, 6, false) == 0) && (json_string.getData().Length == 11)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeModifierNameKnownValues.ModifierName_NHLEmptyNet; goto open_enum_is_done; } break; case 'v': if ((String.Compare(json_string.getData(), 5, "enStrength", 0, 10, false) == 0) && (json_string.getData().Length == 15)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeModifierNameKnownValues.ModifierName_NHLEvenStrength; goto open_enum_is_done; } break; default: break; } break; case 'P': switch (json_string.getData()[4]) { case 'e': if ((String.Compare(json_string.getData(), 5, "nalty", 0, 5, false) == 0) && (json_string.getData().Length == 10)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeModifierNameKnownValues.ModifierName_NHLPenalty; goto open_enum_is_done; } break; case 'o': if ((String.Compare(json_string.getData(), 5, "werPlay", 0, 7, false) == 0) && (json_string.getData().Length == 12)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeModifierNameKnownValues.ModifierName_NHLPowerPlay; goto open_enum_is_done; } break; default: break; } break; case 'S': if (String.Compare(json_string.getData(), 4, "ho", 0, 2, false) == 0) { switch (json_string.getData()[6]) { case 'o': if ((String.Compare(json_string.getData(), 7, "tout", 0, 4, false) == 0) && (json_string.getData().Length == 11)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeModifierNameKnownValues.ModifierName_NHLShootout; goto open_enum_is_done; } break; case 'r': if ((String.Compare(json_string.getData(), 7, "tHanded", 0, 7, false) == 0) && (json_string.getData().Length == 14)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeModifierNameKnownValues.ModifierName_NHLShortHanded; goto open_enum_is_done; } break; default: break; } } break; default: break; } } break; case 'P': if ((String.Compare(json_string.getData(), 1, "erGame", 0, 6, false) == 0) && (json_string.getData().Length == 7)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeModifierNameKnownValues.ModifierName_PerGame; goto open_enum_is_done; } break; case 'U': if ((String.Compare(json_string.getData(), 1, "nknown", 0, 6, false) == 0) && (json_string.getData().Length == 7)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeModifierNameKnownValues.ModifierName_Unknown; goto open_enum_is_done; } break; default: break; } the_open_enum.in_known_list = false; the_open_enum.string_value = json_string.getData(); open_enum_is_done :; setModifierName(the_open_enum); }