/*
    TCFbECommandLineParser.h    June 6, 2004.

    Copyright (C) 2003-2004 CFbE Research Group,
    Software Engineering Laboratory,
    Graduate School of Information Science,
    Nara Institute of Science and Technology,
    All rights reserved.

    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, (at your option) or
    any later version.

    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with GNU Emacs; see the file COPYING.  If not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/
//---------------------------------------------------------------------------
#ifndef TCFbECommandLineParserH
#define TCFbECommandLineParserH
//---------------------------------------------------------------------------
#include <system.hpp>
#include <Classes.hpp>

#include "TCFbETypes.h"
#include "EDocfbeError.h"

#include "TCFbESimilarityComputationAlgorithm.h"
#include "TCFbEPredictionAlgorithm.h"

#include "TCFbECosineSimilarity.h"
#include "TCFbEAdjustedCosineSimilarityWithAverage.h"
#include "TCFbEAdjustedCosineSimilarityWithMedian.h"
#include "TCFbECorrelationCoefficientWithAverage.h"
#include "TCFbECorrelationCoefficientWithMedian.h"
#include "TCFbERankCorrelation.h"
#include "TCFbEDistanceSimilarityWithAverage.h"
#include "TCFbEDistanceSimilarityWithMedian.h"

#include "TCFbEWeightedSum.h"
#include "TCFbEAdjustedWeightedSumWithAverageOfColumn.h"
#include "TCFbEAdjustedWeightedSumWithMedianOfColumn.h"
#include "TCFbEAdjustedWeightedSumWithAverageOfNeighbors.h"
#include "TCFbEAdjustedWeightedSumWithMedianOfNeighbors.h"
#include "TCFbEAdjustedWeightedSumWithAverageOfRow.h"
#include "TCFbEAdjustedWeightedSumWithMedianOfRow.h"
#include "TCFbEAmplifiedWeightedSumWithAveragedMultiplier.h"
#include "TCFbEAmplifiedWeightedSumWithMedianOfMultiplier.h"
//---------------------------------------------------------------------------
class TCFbECommandLineParser : public TObject
{
public:
    virtual __fastcall TCFbECommandLineParser(int argc=0, char* argv[]=NULL);    // コンストラクタ
    __fastcall ~TCFbECommandLineParser();    // デストラクタ

    // アクセサ
    virtual TCFbESimilarityComputationAlgorithm* __fastcall GetSimilarityComputationAlgorithm(void);
    virtual TCFbEPredictionAlgorithm* __fastcall GetPredictionAlgorithm(void);

    int    ErrorCode;    // エラーコード（エラーがない場合は 0
    AnsiString    ErrorParameter;    // エラーパラメータ

    bool    HelpEnabled;    // ヘルプ

    TStringList*    LearningDataFileNameList;
    TStringList*    EstimatingDataFileNameList;
    AnsiString    SimilarityComputationName;
    AnsiString    PredictionName;
    TCFbEValueBase    ValueBase;
    TCFbEAlgorithmBase    AlgorithmBase;
    int    NeighborsSize;
    TStringList*    TargetColumnLabelList;
    bool    DefaultValueEnabled;
    double    DefaultValue;
    bool    InverseCaseFrequencyEnabled;
    double    CaseAmplifier;
    TMergeBase    MergeBase;    // マージ方法
    bool    DisplayNeighbors;        // Neighborhoods のラベルを表示するかどうか
    bool    DisplaySimilarities;    // Neighborhoods の類似度を表示するかどうか
    bool    DisplayValues;    //  Neghbors の値を表示するかどうか
    bool    DisplayDistribution;     // 類似度の分布を表示するかどうか
    bool    Recommendation;    // Recommendation 形式での出力    
    TFileName    OutputFileName;

protected:
    TStringList* FOptionList;

    virtual bool __fastcall IsEmpty(void);    // オプションがない
    virtual bool __fastcall IsEnableOption(AnsiString OptionLabel0, AnsiString OptionLabel1);    // OptionLabel0, OptionLabel1 のどちらかが OptionList に含まれていれば返す
    virtual bool __fastcall IsEnableValue(AnsiString OptionLabel0, AnsiString OptionLabel1);    // OptionLabel0, OptionLabel1 のどちらかと OptionLabel=文字列 という形式で関連付けられた文字列があれば true を返す
    virtual AnsiString __fastcall GetValueString(AnsiString OptionLabel0, AnsiString OptionLabel1);    // OptionLabel0, OptionLabel1 のどちらかと OptionLabel=文字列 という形式で関連付けられた文字列が OptionList にあれば返す

    virtual TCFbESimilarityComputationAlgorithm* __fastcall CreateSimilarityComputationAlgorithm(AnsiString AlgorithmName);
    virtual TCFbEPredictionAlgorithm* __fastcall CreatePredictionAlgorithm(AnsiString AlgorithmName);

private:

};
//---------------------------------------------------------------------------
#endif
