Chris@16: // Copyright Vladimir Prus 2004. Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt Chris@16: // or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_CMDLINE_HPP_VP_2004_03_13 Chris@16: #define BOOST_CMDLINE_HPP_VP_2004_03_13 Chris@16: Chris@16: namespace boost { namespace program_options { namespace command_line_style { Chris@16: /** Various possible styles of options. Chris@16: Chris@16: There are "long" options, which start with "--" and "short", Chris@16: which start with either "-" or "/". Both kinds can be allowed or Chris@16: disallowed, see allow_long and allow_short. The allowed character Chris@16: for short options is also configurable. Chris@16: Chris@16: Option's value can be specified in the same token as name Chris@16: ("--foo=bar"), or in the next token. Chris@16: Chris@16: It's possible to introduce long options by the same character as Chris@16: short options, see allow_long_disguise. Chris@16: Chris@16: Finally, guessing (specifying only prefix of option) and case Chris@16: insensitive processing are supported. Chris@16: */ Chris@16: enum style_t { Chris@16: /// Allow "--long_name" style Chris@16: allow_long = 1, Chris@16: /// Allow "--foo=10 Chris@16: */ Chris@16: allow_long_disguise = short_case_insensitive << 1, Chris@16: /** The more-or-less traditional unix style. */ Chris@16: unix_style = (allow_short | short_allow_adjacent | short_allow_next Chris@16: | allow_long | long_allow_adjacent | long_allow_next Chris@16: | allow_sticky | allow_guessing Chris@16: | allow_dash_for_short), Chris@16: /** The default style. */ Chris@16: default_style = unix_style Chris@16: }; Chris@16: }}} Chris@16: Chris@16: Chris@16: #endif Chris@16: