// file : odb/options.cli // author : Boris Kolpackov // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file include ; include ; include ; class options { // // Wrapper options. These are not passed to the plugin. // bool --help {"Print usage information and exit."}; bool --version {"Print version and exit."}; // // Plugin options. // ::database --database | -d { "", "Generate code for the database. Valid values are \cb{mysql} and \cb{tracer}." }; bool --generate-query { "Generate query support code. Without this support you can only load objects via their ids." }; bool --generate-schema { "Generate database schema. The resulting SQL file creates database tables required to store classes defined in the file being compiled. Note that all the existing information stored in such tables will be lost." }; std::string --output-dir | -o { "", "Write the generated files to instead of the current directory." }; std::string --odb-file-suffix = "-odb" { "", "Use instead of the default \cb{-odb} to construct the names of the generated C++ files." }; std::string --hxx-suffix = ".hxx" { "", "Use instead of the default \cb{.hxx} to construct the name of the generated C++ header file." }; std::string --ixx-suffix = ".ixx" { "", "Use instead of the default \cb{.ixx} to construct the name of the generated C++ inline file." }; std::string --cxx-suffix = ".cxx" { "", "Use instead of the default \cb{.cxx} to construct the name of the generated C++ source file." }; std::string --sql-suffix = ".sql" { "", "Use instead of the default \cb{.sql} to construct the name of the generated database schema file." }; // Prologues. // std::vector --hxx-prologue { "", "Insert at the beginning of the generated C++ header file." }; std::vector --ixx-prologue { "", "Insert at the beginning of the generated C++ inline file." }; std::vector --cxx-prologue { "", "Insert at the beginning of the generated C++ source file." }; std::vector --sql-prologue { "", "Insert at the beginning of the generated database schema file." }; // Epilogues. // std::vector --hxx-epilogue { "", "Insert at the end of the generated C++ header file." }; std::vector --ixx-epilogue { "", "Insert at the end of the generated C++ inline file." }; std::vector --cxx-epilogue { "", "Insert at the end of the generated C++ source file." }; std::vector --sql-epilogue { "", "Insert at the end of the generated database schema file." }; // Prologue files. // std::string --hxx-prologue-file { "", "Insert the content of at the beginning of the generated C++ header file." }; std::string --ixx-prologue-file { "", "Insert the content of at the beginning of the generated C++ inline file." }; std::string --cxx-prologue-file { "", "Insert the content of at the beginning of the generated C++ source file." }; std::string --sql-prologue-file { "", "Insert the content of at the beginning of the generated database schema file." }; // Epilogue files. // std::string --hxx-epilogue-file { "", "Insert the content of at the end of the generated C++ header file." }; std::string --ixx-epilogue-file { "", "Insert the content of at the end of the generated C++ inline file." }; std::string --cxx-epilogue-file { "", "Insert the content of at the end of the generated C++ source file." }; std::string --sql-epilogue-file { "", "Insert the content of at the end of the generated database schema file." }; // Include options. // bool --include-with-brackets { "Use angle brackets (<>) instead of quotes (\"\") in the generated \cb{#include} directives." }; std::string --include-prefix { "", "Add to the generated \cb{#include} directive paths." }; std::string --guard-prefix { "", "Add to the generated header inclusion guards. The prefix is transformed to upper case and characters that are illegal in a preprocessor macro name are replaced with underscores." }; // This is a "fake" option in that it is actually handled by // argv_file_scanner. We have it here to get the documentation. // std::string --options-file { "", "Read additional options from with each option appearing on a separate line optionally followed by space and an option value. Empty lines and lines starting with \cb{#} are ignored. Option values can be enclosed in double (\cb{\"}) or single (\cb{'}) quotes to preserve leading and trailing whitespaces as well as to specify empty values. If the value itself contains trailing or leading quotes, enclose it with an extra pair of quotes, for example \cb{'\"x\"'}. Non-leading and non-trailing quotes are interpreted as being part of the option value. The semantics of providing options in a file is equivalent to providing the same set of options in the same order on the command line at the point where the \cb{--options-file} option is specified except that the shell escaping and quoting is not required. Repeat this option to specify more than one options files." }; bool --trace {"Trace the compilation process."}; // // MySQL-specific options. // std::string --mysql-engine = "InnoDB" { "", "Use instead of the default \cb{InnoDB} in the generated database schema file. For more information on the storage engine options see the MySQL documentation. If you would like to use the database-default engine, pass \cb{default} as the value for this option." }; };