<commit_before>/* 
 * File:   ctp_run.cc
 * Author: schrader
 *
 * Created on July 12, 2010, 3:11 PM
 */

#include <stdlib.h>
#include "qmapplication.h"
#include <calculatorfactory.h>
/*
 *
 */
int main(int argc, char** argv) {

//<<<<<<< local
    QMApplication qm_app;


    qm_app.AddCalculator(Calculators().Create("integrals"));
    qm_app.AddCalculator(Calculators().Create("histintegrals"));


    //    qm_app.AddCalculator(Calculators().Create("writexml"));

    qm_app.Run(argc, argv);

//=======
//    QMApplication calc_estatics;
//    CalcEstatics calc_estat;
//    calc_estatics.AddCalculator(dynamic_cast<QMCalculator*>(&calc_estat));
//    calc_estatics.Run(argc, argv);
//
//>>>>>>> other
    return (EXIT_SUCCESS);
}
<commit_msg>first brief implementation<commit_after>/* 
 * File:   ctp_run.cc
 * Author: schrader
 *
 * Created on July 12, 2010, 3:11 PM
 */

#include <stdlib.h>
#include "qmapplication.h"
#include <calculatorfactory.h>
/*
 *
 */
class QMAppRun : public QMApplication
{
public:
    void HelpText() {}

    void AddSpecificOptions(){
        _op_desc_specific.add_options()
        ("exec", boost::program_options::value<string>(), "execution list");
    }

    //TODO: Support for XML-File based options
    void CheckInput() {
        if (_op_vm.count("exec")) {
            Tokenizer tok(_op_vm["exec"].as<string>(), " ,\n\t");
            for (Tokenizer::iterator n = tok.begin(); n != tok.end(); ++n)
                AddCalculator(Calculators().Create((*n).c_str()));
        }
    }
};

int main(int argc, char** argv) {
    QMAppRun qmapprun;
    qmapprun.Run(argc, argv);
    return (EXIT_SUCCESS);
}
{'fraction_non_alphanumeric': 0.17528910529519173, 'fraction_numerical': 0.010955569080949483, 'mean_word_length': 3.2924281984334205, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3584552', 'n_tokens_mistral': 619, 'n_tokens_neox': 579, 'n_words': 107}