public static AcceptOption ( string Text, int &Index, |
||
Text | string | |
Index | int | |
Options | ||
ErrorIndex | int | |
리턴 | bool |
public static bool AcceptOption(string Text, ref int Index, SoundOptions Options, out int ErrorIndex)
{
string optname = null;
int optvalue = 0;
if (AcceptOption(Text, ref Index, ref optname, ref optvalue, out ErrorIndex))
{
switch (optname)
{
case "rate":
Options.Rate = optvalue;
break;
case "offset":
Options.Offset = optvalue;
break;
case "length":
Options.Length = optvalue;
break;
case "resolution":
Options.Resolution = optvalue;
break;
default:
break;
}
return true;
}
return false;
}
Parser::AcceptOption ( string Text, int &Index, string &Name, int &Value, int &ErrorIndex ) : bool |