Prohibit the client from calling some constructors without arguments.

The reason is to avoid the misuse of constructors that should be called
with arguments.
This commit is contained in:
Tetsuo Kiso 2011-11-14 12:58:42 +09:00
parent 20afe4babb
commit 0c7a38d9d2
2 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,9 @@ protected:
name2idx arrayname2idx_; // map from name to index of array
private:
// Do not allow the user to instanciate without arguments.
ScoreData() {}
Scorer* theScorer;
std::string score_type;
size_t number_of_scores;

View File

@ -113,6 +113,9 @@ class OptimizationTask : public Moses::Task
}
private:
// Do not allow the user to instanciate without arguments.
OptimizationTask() {}
Optimizer* m_optimizer;
Point m_point;
statscore_t m_score;