-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support interactive evaluator (#137)
Resolve #118
- Loading branch information
Showing
37 changed files
with
1,130 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#pragma once | ||
|
||
#include <utility> | ||
|
||
using std::move; | ||
|
||
namespace tcframe { | ||
|
||
enum class TestCaseOutputType { | ||
OPTIONAL, | ||
NOT_REQUIRED | ||
}; | ||
|
||
class EvaluatorConfig { | ||
friend class EvaluatorConfigBuilder; | ||
|
||
private: | ||
TestCaseOutputType testCaseOutputType_; | ||
|
||
public: | ||
TestCaseOutputType testCaseOutputType() const { | ||
return testCaseOutputType_; | ||
} | ||
|
||
bool operator==(const EvaluatorConfig& o) const { | ||
return tie(testCaseOutputType_) == tie(o.testCaseOutputType_); | ||
} | ||
}; | ||
|
||
class EvaluatorConfigBuilder { | ||
private: | ||
EvaluatorConfig subject_; | ||
|
||
public: | ||
EvaluatorConfigBuilder& setTestCaseOutputType(TestCaseOutputType testCaseOutputType) { | ||
subject_.testCaseOutputType_ = testCaseOutputType; | ||
return *this; | ||
} | ||
|
||
EvaluatorConfig build() { | ||
return move(subject_); | ||
} | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.