PHP 클래스 judge_base, moodle-local_onlinejudge

파일 보기 프로젝트 열기: hit-moodle/moodle-local_onlinejudge

보호된 프로퍼티들

프로퍼티 타입 설명
$language language id without judge id
$task object of the task

공개 메소드들

메소드 설명
__construct ( $task )
get_compiler_info ( string $language ) : compiler Return the infomation of the compiler of specified language
get_languages ( ) Return an array of programming languages supported by this judge
is_available ( ) : true Whether the judge is avaliable
judge ( ) : updated Judge the current task
parse_options ( $options, &$task ) : throw Put options into task

보호된 메소드들

메소드 설명
convert_to_utf8 ( $string ) If string is not encoded in UTF-8, convert it into utf-8 charset
create_temp_files ( ) : array Save files of current task to a temp directory
diff ( ) Compare the stdout of program and the output of testcase

메소드 상세

__construct() 공개 메소드

public __construct ( $task )

convert_to_utf8() 보호된 메소드

If string is not encoded in UTF-8, convert it into utf-8 charset
protected convert_to_utf8 ( $string )

create_temp_files() 보호된 메소드

Save files of current task to a temp directory
protected create_temp_files ( ) : array
리턴 array of the full path of saved files

diff() 보호된 메소드

Compare the stdout of program and the output of testcase
protected diff ( )

get_compiler_info() 정적인 공개 메소드

Return the infomation of the compiler of specified language
static public get_compiler_info ( string $language ) : compiler
$language string ID of the language
리턴 compiler information or null

get_languages() 정적인 공개 메소드

The array key must be the language's ID, such as c_sandbox, python_ideone. The array value must be a human-readable name of the language, such as 'C (local)', 'Python (ideone.com)'
static public get_languages ( )

is_available() 정적인 공개 메소드

Whether the judge is avaliable
static public is_available ( ) : true
리턴 true for yes, false for no

judge() 공개 메소드

Judge the current task
public judge ( ) : updated
리턴 updated task or false

parse_options() 정적인 공개 메소드

Put options into task
static public parse_options ( $options, &$task ) : throw
리턴 throw exceptions on error

프로퍼티 상세

$language 보호되어 있는 프로퍼티

language id without judge id
protected $language

$task 보호되어 있는 프로퍼티

object of the task
protected $task