The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions | Variables
schema_generator.cpp File Reference

This file parses the input parameters, prepares a list of files to be parsed and calls parser for each of them. More...

#include "tools/schema/sourceparser.hpp"
#include "filesystem.hpp"
#include <iostream>
#include <fstream>
#include <string>
#include <string.h>
Include dependency graph for schema_generator.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 Parses the command line. More...
 

Variables

std::string version = "0.6.0"
 

Detailed Description

This file parses the input parameters, prepares a list of files to be parsed and calls parser for each of them.

Definition in file schema_generator.cpp.

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Parses the command line.

Return values
0Everything's OK!
1Errors found. User decided to exit.
2No input files found. Please, check your input directory.
3Output file for schema cannot be created.
4Output file for regex list cannot be created.

Getting full list of files recursively.

Let the user decide whether error are great or just misprints. If any error found, waits for a Yy or Nn to continue or not.

Definition at line 44 of file schema_generator.cpp.

References filesystem::base_name(), c, filesystem::ENTIRE_FILE_PATH, schema_validation::class_source_parser::expand(), filesystem::file_exists(), filesystem::get_files_in_dir(), i, filesystem::is_directory(), schema_validation::class_error_container::is_empty(), schema_validation::class_source_parser::parse_source(), schema_validation::class_error_container::print_errors(), schema_validation::class_source_parser::save_schema(), schema_validation::class_source_parser::see_errors(), schema_validation::class_source_parser::set_input(), schema_validation::class_source_parser::set_output(), schema_validation::test_regex(), and version.

Variable Documentation

std::string version = "0.6.0"

Definition at line 33 of file schema_generator.cpp.

Referenced by main().