00001 #include "main.h"
00002 using namespace std;
00003
00004 Natural main(Natural argc, char **argv)
00005 {
00006 cout<<"**************************************"<<endl;
00007 cout<<"**************************************"<<endl;
00008 cout<<"***** *****"<<endl;
00009 cout<<"***** Terreneuve-Devel project *****"<<endl;
00010 cout<<"***** *****"<<endl;
00011 cout<<"**************************************"<<endl;
00012 cout<<"**************************************\n"<<endl;
00013
00014 cout<<"Welcome to Terreneuve Project user interface.\n"<<endl;
00015
00016 bool replay=true,haveDataBeenImported;
00017 marketData data;
00018 importData import;
00019 Natural choice;
00020
00021 while(replay){
00022 choice =0;
00023 cout<<"**************************************"<<endl;
00024 cout<<"************ Main Menu ************"<<endl;
00025 cout<<"**************************************\n"<<endl;
00026 cout<<"\nWhat would you like to do? Press:"<<endl;
00027 cout<<"1 - To import data"<<endl;
00028 cout<<"2 - To create some products"<<endl;
00029 cout<<"3 - To create and save a portfolio"<<endl;
00030 cout<<"4 - To visualize the tests we ran"<<endl;
00031 cout<<"5 - To view the credits"<<endl;
00032 cout<<"6 - To quit"<<endl;
00033 cin>>choice;
00034 switch(choice){
00035 case 1:
00036 import=importData(*argv);
00037 haveDataBeenImported=true;
00038 data=import.getData();
00039 break;
00040 case 2:
00041 if(haveDataBeenImported)
00042 productsCreationMenu(data);
00043 else
00044 cout<<"Without any data you cannot use products, at least import the default and do not use it later..."<<endl;
00045 break;
00046 case 3:
00047 cout<<"Not yet available - promise will be soon"<<endl;
00048 break;
00049 case 4:
00050 maintests(argc,argv);
00051 break;
00052 case 5:
00053 credits();
00054 break;
00055 default:
00056 replay=false;
00057 }
00058 }
00059 return 1;
00060 }