Blame test/options.h

Packit 2035a7
// Cppcheck - A tool for static C/C++ code analysis
Packit 2035a7
// Copyright (C) 2007-2017 Cppcheck team.
Packit 2035a7
//
Packit 2035a7
// This program is free software: you can redistribute it and/or modify
Packit 2035a7
// it under the terms of the GNU General Public License as published by
Packit 2035a7
// the Free Software Foundation, either version 3 of the License, or
Packit 2035a7
// (at your option) any later version.
Packit 2035a7
//
Packit 2035a7
// This program is distributed in the hope that it will be useful,
Packit 2035a7
// but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 2035a7
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 2035a7
// GNU General Public License for more details.
Packit 2035a7
//
Packit 2035a7
// You should have received a copy of the GNU General Public License
Packit 2035a7
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit 2035a7
Packit 2035a7
#ifndef OPTIONS_H
Packit 2035a7
#define OPTIONS_H
Packit 2035a7
Packit 2035a7
#include <set>
Packit 2035a7
#include <string>
Packit 2035a7
Packit 2035a7
/**
Packit 2035a7
 * @brief Class to parse command-line parameters for ./testrunner .
Packit 2035a7
 * Has getters for available switches and parameters.
Packit 2035a7
 * See test/testoptions.cpp for sample usage.
Packit 2035a7
 */
Packit 2035a7
class options {
Packit 2035a7
public:
Packit 2035a7
    /** Call from main() to populate object */
Packit 2035a7
    options(int argc, const char* argv[]);
Packit 2035a7
    /** Don't print the name of each method being tested. */
Packit 2035a7
    bool quiet() const;
Packit 2035a7
    /** Which test should be run. Empty string means 'all tests' */
Packit 2035a7
    const std::string& which_test() const;
Packit 2035a7
Packit 2035a7
private:
Packit 2035a7
    options();
Packit 2035a7
    options(const options& non_copy);
Packit 2035a7
    const options& operator =(const options& non_assign);
Packit 2035a7
Packit 2035a7
private:
Packit 2035a7
    std::set<std::string> _options;
Packit 2035a7
    std::string _which_test;
Packit 2035a7
    const bool _quiet;
Packit 2035a7
};
Packit 2035a7
Packit 2035a7
#endif