/*  Copyright 2011 AIT Austrian Institute of Technology

*

*   This file is part of OpenTLD.

*

*   OpenTLD 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 3 of the License, or

*   (at your option) any later version.

*

*   OpenTLD 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 OpenTLD.  If not, see <http://www.gnu.org/licenses/>.

*

*/


/**

  * @author Georg Nebehay

  */


#include "Main.h"

#include "Config.h"

#include "ImAcq.h"

#include "Gui.h"


using tld::Config;

using tld::Gui;

using tld::Settings;


int main(int argc, char **argv)

{


    Main *main = new Main();

    Config config;

    ImAcq *imAcq = imAcqAlloc();

    Gui *gui = new Gui();


    main->gui = gui;

    main->imAcq = imAcq;


    if(config.init(argc, argv) == PROGRAM_EXIT)

    {

        return EXIT_FAILURE;

    }


    config.configure(main);


    srand(main->seed);


    imAcqInit(imAcq);


    if(main->showOutput)

    {

        gui->init();

    }


    main->doWork();


    delete main;

    main = NULL;

    delete gui;

    gui = NULL;


    return EXIT_SUCCESS;

}




메인 소스 코드는 위와같이 간단하다!

'STUDY > OpenTLD' 카테고리의 다른 글

[Class]ForegroundDetector  (0) 2014.04.12
[Class]Main  (0) 2014.04.01
설치  (0) 2014.04.01

+ Recent posts