/*File Name: main.cpp
  Author: Betti Österholz ; Date: 10.02.2003
  System: C++

  This file is for showing the parameters of a parameter file.
  Type the name of the parameterfile as the start parameter of this program.

  
  Copyright (C) 2004  Betti Österholz

  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, June 1991, of the License, or
  (at your option) 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 this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
#include <iostream>
#include <sstream>
#include <string>
#include <list>

#include "Parameter.h"


int main(int argv,char* argc[])
{
Parameter para;
if (argv>=2)
{
	if (para.load(argc[1]))
	{
		cout<<endl<<"parameters not shown are 0 "<<endl<<endl;
		cout<<"init parameters : ";
		for (int i=0;i<50;i++)//init
		{
		if ((para.getInitParameter(i))!=0)
			{cout<<"("<<i<<":"<<para.getInitParameter(i)<<") ";}
		}
		double sum=0.0;
		cout<<endl<<endl<<"operations parameters : ";
		for (int i=0;i<50;i++)//Operations
		{
		if ((para.getOperationsParameter(i))!=0)
			{
				cout<<"("<<i<<":"<<para.getOperationsParameter(i)<<") ";
				if (i>9) {sum+=para.getOperationsParameter(i);}
			}
		}
		cout<<endl<<"sum operations parameters > 9 : "<<sum;
		cout<<endl<<endl<<"terminal condition parameters : ";
		for (int i=0;i<100;i++)//TerminalCondition
		{
		if ((para.getTerminalConditionParameter(i))!=0)
			{cout<<"("<<i<<":"<<para.getTerminalConditionParameter(i)<<") ";}
		}
		cout<<endl<<endl<<"document parameters : ";
		for (int i=0;i<50;i++)//Document
		{
		if ((para.getDocumentParameter(i))!=0)
			{cout<<"("<<i<<":"<<para.getDocumentParameter(i)<<") ";}
		}
		cout<<endl<<endl<<"names parameters : "<<endl;
		for (int i=0;i<50;i++)//Names
		{
		cout<<"("<<i<<":"<<para.getNamesParameter(i)<<") ";
		}
		cout<<endl<<endl;
	}else{cout<<endl<<"could not read"<<endl;}
}
};

