File tree Expand file tree Collapse file tree 4 files changed +42
-9
lines changed
app/helpers/ExerciseConfig/Pipeline/Box Expand file tree Collapse file tree 4 files changed +42
-9
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ public function __construct() {
49
49
NodeRunBox::$ NODE_RUN_TYPE => NodeRunBox::class,
50
50
MergeFilesBox::$ BOX_TYPE => MergeFilesBox::class,
51
51
MergeStringsBox::$ BOX_TYPE => MergeStringsBox::class,
52
- FileToArrayBox::$ SCALAR_TO_ARRAY_TYPE => FileToArrayBox::class,
53
- StringToArrayBox::$ SCALAR_TO_ARRAY_TYPE => StringToArrayBox::class,
52
+ FileToArrayBox::$ BOX_TYPE => FileToArrayBox::class,
53
+ StringToArrayBox::$ BOX_TYPE => StringToArrayBox::class,
54
54
FilesNamesBox::$ BOX_TYPE => FilesNamesBox::class,
55
55
CustomCompilationBox::$ CUSTOM_COMPILATION_TYPE => CustomCompilationBox::class,
56
56
];
Original file line number Diff line number Diff line change 15
15
16
16
17
17
/**
18
- * Box that comp
18
+ * Box that compile Bison format into C/C++ sources.
19
19
*/
20
20
class BisonCompilationBox extends CompilationBox
21
21
{
@@ -27,8 +27,8 @@ class BisonCompilationBox extends CompilationBox
27
27
public static $ OUTPUT_FILES_PORT_KEY = "output " ;
28
28
29
29
private static $ initialized = false ;
30
- private static $ defaultInputPorts ;
31
30
private static $ defaultOutputPorts ;
31
+ private static $ defaultInputPorts ;
32
32
33
33
/**
34
34
* Static initializer.
@@ -47,7 +47,6 @@ public static function init() {
47
47
}
48
48
49
49
/**
50
- * JudgeNormalBox constructor.
51
50
* @param BoxMeta $meta
52
51
*/
53
52
public function __construct (BoxMeta $ meta ) {
Original file line number Diff line number Diff line change 14
14
*/
15
15
class FileToArrayBox extends ScalarToArrayBox
16
16
{
17
+ public static $ BOX_TYPE = "file-to-array " ;
18
+ public static $ DEFAULT_NAME = "File to array " ;
19
+
17
20
/**
18
21
* Static initializer.
19
22
* @throws ExerciseConfigException
20
23
*/
21
24
public static function init () {
22
- self ::$ SCALAR_TO_ARRAY_TYPE = "file-to-array " ;
23
- self ::$ DEFAULT_NAME = "File to array " ;
24
25
static ::initScalarToArray (VariableTypes::$ FILE_TYPE , VariableTypes::$ FILE_ARRAY_TYPE );
25
26
}
26
27
28
+ /**
29
+ * Get type of this box.
30
+ * @return string
31
+ */
32
+ public function getType (): string {
33
+ return self ::$ BOX_TYPE ;
34
+ }
35
+
36
+ /**
37
+ * Get default name of this box.
38
+ * @return string
39
+ */
40
+ public function getDefaultName (): string {
41
+ return self ::$ DEFAULT_NAME ;
42
+ }
43
+
27
44
}
Original file line number Diff line number Diff line change 14
14
*/
15
15
class StringToArrayBox extends ScalarToArrayBox
16
16
{
17
+ public static $ BOX_TYPE = "string-to-array " ;
18
+ public static $ DEFAULT_NAME = "String to array " ;
19
+
17
20
/**
18
21
* Static initializer.
19
22
* @throws ExerciseConfigException
20
23
*/
21
24
public static function init () {
22
- self ::$ SCALAR_TO_ARRAY_TYPE = "string-to-array " ;
23
- self ::$ DEFAULT_NAME = "String to array " ;
24
25
static ::initScalarToArray (VariableTypes::$ STRING_TYPE , VariableTypes::$ STRING_ARRAY_TYPE );
25
26
}
26
27
28
+ /**
29
+ * Get type of this box.
30
+ * @return string
31
+ */
32
+ public function getType (): string {
33
+ return self ::$ BOX_TYPE ;
34
+ }
35
+
36
+ /**
37
+ * Get default name of this box.
38
+ * @return string
39
+ */
40
+ public function getDefaultName (): string {
41
+ return self ::$ DEFAULT_NAME ;
42
+ }
43
+
27
44
}
You can’t perform that action at this time.
0 commit comments