C# 클래스 PolaMUD.Parser

파일 보기 프로젝트 열기: Polatrite/PolaMUD

공개 메소드들

메소드 설명
GetArgument ( string line, int index ) : PolaMUD.Argument

Retrieves the appropriate argument from the given input string, optionally retrieving an object reference based on what you're looking for (Player, Room, etc.)

GetArgument ( string line, int index, Mob user, Type reference, int searchLocation ) : PolaMUD.Argument

Retrieves tshe appropriate Argument from the given input string. Argument's reference object is automatically retrieved based on the Type and SearchLocations enumeration provided.

GetStringArgument ( string line, int index ) : PolaMUD.Argument

Retrieves a string argument from the given input string. This argument should always be the last argument in the line, as this will retrieve the rest of the input string after all previous arguments.

Interpret ( PolaMUD.TelnetConnection conn, string line ) : void

Thread-safe callback from each TelnetConnection, parsing input. This function is timed internally by PulseTimer().

비공개 메소드들

메소드 설명
GetArgumentString ( string line, int index, bool takeAll ) : string

This returns the string that composes an entire argument, including handling prefixes such as 3. or 5* This is for internal use. External calls to the parser should use GetArgument.

메소드 상세

GetArgument() 공개 정적인 메소드

Retrieves the appropriate argument from the given input string, optionally retrieving an object reference based on what you're looking for (Player, Room, etc.)
public static GetArgument ( string line, int index ) : PolaMUD.Argument
line string The input string
index int The index of the desired argument (1 is always the command itself)
리턴 PolaMUD.Argument

GetArgument() 공개 정적인 메소드

Retrieves tshe appropriate Argument from the given input string. Argument's reference object is automatically retrieved based on the Type and SearchLocations enumeration provided.
public static GetArgument ( string line, int index, Mob user, Type reference, int searchLocation ) : PolaMUD.Argument
line string The input string
index int The index of the desired argument (1 is always the command itself)
user Mob The user Mob, for retrieving references based on this Mob's state
reference System.Type The Type to search for (Mob, Player, etc.)
searchLocation int A SearchLocations enumeration to use in finding the reference
리턴 PolaMUD.Argument

GetStringArgument() 공개 정적인 메소드

Retrieves a string argument from the given input string. This argument should always be the last argument in the line, as this will retrieve the rest of the input string after all previous arguments.
public static GetStringArgument ( string line, int index ) : PolaMUD.Argument
line string The input string
index int The index of the desired argument (1 is always the command itself)
리턴 PolaMUD.Argument

Interpret() 공개 정적인 메소드

Thread-safe callback from each TelnetConnection, parsing input. This function is timed internally by PulseTimer().
public static Interpret ( PolaMUD.TelnetConnection conn, string line ) : void
conn PolaMUD.TelnetConnection The TelnetConnection the input is coming from
line string The input string
리턴 void