public void setQueryType(TypeQueryTypeKnownValues new_value) { TypeQueryType new_full_value = new TypeQueryType(); Debug.Assert(new_value != TypeQueryTypeKnownValues.QueryType__none); new_full_value.in_known_list = true; new_full_value.list_value = new_value; setQueryType(new_full_value); }
public string getQueryTypeAsString() { TypeQueryType result = getQueryType(); if (result.in_known_list) { return(stringFromQueryType(result.list_value)); } else { return(result.string_value); } }
public static string stringFromQueryType(TypeQueryType the_enum) { switch (the_enum) { case TypeQueryType.QueryType_CityOfGivenAreaCode: return("CityOfGivenAreaCode"); case TypeQueryType.QueryType_AreaCodeOfGivenCity: return("AreaCodeOfGivenCity"); default: Debug.Assert(false); return(null); } }
protected override void handle_result(string result) { TypeQueryTypeKnownValues known = stringToQueryType(result); TypeQueryType new_value = new TypeQueryType(); if (known == TypeQueryTypeKnownValues.QueryType__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 setQueryType(string chars) { TypeQueryTypeKnownValues known = stringToQueryType(chars); TypeQueryType new_value = new TypeQueryType(); if (known == TypeQueryTypeKnownValues.QueryType__none) { new_value.in_known_list = false; new_value.string_value = chars; } else { new_value.in_known_list = true; new_value.list_value = known; } setQueryType(new_value); }
public static string stringFromQueryType(TypeQueryType the_enum) { switch (the_enum) { case TypeQueryType.QueryType_GeneralInformation: return("GeneralInformation"); case TypeQueryType.QueryType_SignOfGivenYear: return("SignOfGivenYear"); case TypeQueryType.QueryType_YearOfGivenSign: return("YearOfGivenSign"); case TypeQueryType.QueryType_SignOfGivenSign: return("SignOfGivenSign"); default: Debug.Assert(false); return(null); } }
private void fromJSONQueryType(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 QueryType of SportsPlayersArgumentQueryTypeJSON is not a string."); } TypeQueryType the_open_enum = new TypeQueryType(); switch (json_string.getData()[0]) { case 'P': if ((String.Compare(json_string.getData(), 1, "layerInfo", 0, 9, false) == 0) && (json_string.getData().Length == 10)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeQueryTypeKnownValues.QueryType_PlayerInfo; goto open_enum_is_done; } break; case 'W': if ((String.Compare(json_string.getData(), 1, "ho", 0, 2, false) == 0) && (json_string.getData().Length == 3)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeQueryTypeKnownValues.QueryType_Who; 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 :; setQueryType(the_open_enum); }
protected override void handle_result(TypeQueryType result) { top.value.Add(result); }
protected override void handle_result(TypeQueryType result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(TypeQueryType result);
public void setQueryType(TypeQueryType new_value) { flagHasQueryType = true; storeQueryType = new_value; }