LinuxNav2API::LinuxNav2API() // :
   // m_audioTypeDirName("Vorbis")
{
   m_sharedImpl->m_programVersion = ProgramVersion(0, 9, 3);
   m_sharedImpl->m_clientType = "wf-linux-demo";
   JTCInit::initJTC();
}
Ejemplo n.º 2
0
int main(int argc, char ** argv)
{
    int start_time = time(0);

    int cpus;

#ifdef _OPENMP
    omp_set_num_threads(cpus);
#else
    cpus=1;
#endif
    
    /////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////
    ProgramVersion();

    
    /////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////
    // parameters
    Parameters par;
    std::vector<std::string> vec_arg(argc+2); // we add 2 nothing
    for(int i=0; i<argc; i++) vec_arg[i]=(std::string) argv[i];
    vec_arg[argc]="nothing"; // for checking
    vec_arg[argc+1]="nothing";

    if (!par.read(vec_arg))
    {
        std::cout << std::endl;
        std::cout << " For more information type [GeneEvolve --help]." << std::endl;
        std::cout << std::endl;
        return -1;
    }

    if (par._help)
    {
        helpFile();
        return -1;
    }
    
    if (!par.check())
    {
        std::cout << std::endl;
        std::cout << " For more information type [GeneEvolve --help]." << std::endl;
        std::cout << std::endl;
        return -1;
    }
    
    
    par.print();
    
    
    /////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////
    // main simulation
    Simulation simulation;
    simulation.par=par;

    if(!simulation.run())
    {
        std::cout << "Program exits with an error." << std::endl;
        return -1;
    }
    
    //if(log)
    //    fclose(LogFile);

    
    /////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////
    int time_tot = time(0) - start_time;
    std::cout << "\n Program Successfully finished.\n ";
    printf("\n Total Run completed in %d hours, %d mins, %d seconds.\n",
           time_tot / 3600, (time_tot % 3600) / 60, time_tot % 60);
    std::cout << "\n Thank You for using GeneEvolve !!! " << std::endl << std::endl;

	return 0;
}
MaemoNav2API::MaemoNav2API()
{
   m_sharedImpl->m_programVersion = ProgramVersion(0, 9, 3);
   // Maemo client type
   m_sharedImpl->m_clientType = "wf-maemo-demo";
}
S60Nav2API::S60Nav2API()
   : m_s60Nav2APIImplStruct(NULL)
{
   m_sharedImpl->m_httpProto = false;
   m_sharedImpl->m_programVersion = ProgramVersion(0, 9, 50);
}