/*
 * Copyright (c) 1999 Johnny C. Lam.
 * All rights reserved.
 *
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.  The author makes no representations
 * about the suitability of this software for any purpose.  It is
 * provided "as is" without express or implied warranty.
 */

#include <array>
#include <iostream>
#include "commandline.h"

int options[] = {
    CommandLine::VERBOSE,
    CommandLine::NUM_ODH,
    CommandLine::ALLELE_FREQ,
    CommandLine::NUM_NORMALS,
    CommandLine::PATH_STRATEGY,
    CommandLine::DISEASE,
    CommandLine::DISEASED_FNAME,
    CommandLine::NORMAL_FNAME
};

int required[] = {
    CommandLine::DISEASE,
    CommandLine::DISEASED_FNAME,
    CommandLine::NORMAL_FNAME
};

int
main(int argc, char* argv[])
{
    CommandLine::Instance()->Parse(argc, argv,
				   begin_array(options), end_array(options),
				   begin_array(required), end_array(required));

    CommandLine::Instance()->Write(std::cout,
				   begin_array(options), end_array(options));

    std::cout << "verbose: "
	      << CommandLine::Instance()->Verbose() << endl;
    std::cout << "segment: "
	      << CommandLine::Instance()->Segment() << endl;
    std::cout << "left_mask: "
	      << CommandLine::Instance()->LeftMask() << endl;
    std::cout << "right_mask: "
	      << CommandLine::Instance()->RightMask() << endl;
    std::cout << "ssm: "
	      << CommandLine::Instance()->Ssm() << endl;
    std::cout << "ibd: "
	      << CommandLine::Instance()->Ibd() << endl;
    std::cout << "p_mutation: "
	      << CommandLine::Instance()->PMutation() << endl;
    std::cout << "p_recombination: "
	      << CommandLine::Instance()->PRecombination() << endl;
    std::cout << "str_fname: "
	      << CommandLine::Instance()->StrFname() << endl;
    std::cout << "recomb_fname: "
	      << CommandLine::Instance()->RecombFname() << endl;
    std::cout << "max_latent_depth: "
	      << CommandLine::Instance()->MaxLatentDepth() << endl;
    std::cout << "path_strategy: "
	      << CommandLine::Instance()->PathStrategy() << endl;
    std::cout << "disease: "
	      << CommandLine::Instance()->Disease() << endl;
    std::cout << "diseased_fname: "
	      << CommandLine::Instance()->DiseasedFname() << endl;
    std::cout << "num_odh: "
	      << CommandLine::Instance()->NumOdh() << endl;
    std::cout << "criterion: "
	      << CommandLine::Instance()->Criterion() << endl;
    std::cout << "components_fname" 
	      << CommandLine::Instance()->ComponentsFname() << endl;
    std::cout << "allele_freq: "
	      << CommandLine::Instance()->AlleleFreq() << endl;
    std::cout << "num_normals: "
	      << CommandLine::Instance()->NumNormals() << endl;
    std::cout << "normal_fname: "
	      << CommandLine::Instance()->NormalFname() << endl;
    return 0;
}
