/* G-Cows - scripting language for creation of web sites Copyright (C) 2002, 2003, 2004, 2005, 2006 Andrea Sozzi This file is part of G-Cows. G-Cows 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 2, or (at your option) any later version. G-Cows 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 this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef SRC_COWS_MKGEN_OPTIONS_H #define SRC_COWS_MKGEN_OPTIONS_H #include #include #include #include "common.H" #include "options.H" using std::string; using std::vector; typedef vector String_vect; class Branch_options { public: Branch_options () : root (""), prefix (""), cows_options ("") { } Branch_options (string root_in, string prefix_in, string cows_opts_in) : root (root_in), prefix (prefix_in), cows_options (cows_opts_in) { } string root; string prefix; string cows_options; }; typedef std::vector branches_vector; typedef branches_vector::iterator branches_iter; class Mkgen_opt : public Options { public: Mkgen_opt (int argc, char *argv[]); void create_branch (string branch_description); bool next_branch (); void create_src_file (string buffer); //void create_makefile (string boilerplate, const char *dependencies, // string epilogue); void create_empty_makefile (); String_vect &get_transl () { return translations; } friend int yytmpllex(); enum tokens { brief = 1, fatal_warnings, ignore_errors, quiet, silent, verbose, prefix, source, target, option, new_branch, main_site, lang, fast }; enum { o_root_dir, o_prefix, o_source_extension, o_target_extension, o_cows_option, o_output, o_branch_root, o_branch_prefix, o_branch_option, o_branch_id, o_fast_mode }; private: void usage (int status); void version (); void accessibility (); branches_vector branches; String_vect translations; }; #endif // ! SRC_COWS_MKGEN_OPTIONS_H