• Craig Silverstein's avatar
    · 874aed5d
    Craig Silverstein authored
    NOTE: I'm checking this in just to have a record in source control of the idea.  We've decided for now it doesn't make sense to go forward with flag categories -- and the __VA_ARGS__ for macros has caused lots of problems with uncaught accidental commas, already -- so a future commit will back this out.  (Actually, it's all a series of commits, for annoying technical reasons.)
    
    Add support for flag categories.
    
    In this CL, all you can do is set categories in the DEFINE_*
    macros and then retrieve them via GetCommandLineFlagInfo and
    similar.
    
    In future CLs, we will start to give some semantic meaning to
    particular flag values, as described in the designdoc.  In
    particular, we will start to use flag categories to revamp
    --help output.
    
    Implementation-wise: to keep categories an optional macro
    argument, I had to use __VA_ARGS__, which means future gflags
    releases will no longer work with MSVC 7.1.  We're at MSVC 10
    now, so I'm pretty much ok with that.
    
    The downside of __VA_ARGS__ is there is no error if you
    specify more args after the ones we expect.  To get around
    that, I only use __VA_ARGS_ in this idiom:
    static const OptionalDefineArgs var = { __VA_ARGS__ };
    The new OptionalDefineArgs struct defines all the args that
    may be optionally specified in the DEFINE_* macros.  For now,
    that's only the 'categories' arg, though in theory more could be
    added later.
    
    R=titus,ncalvin
    DELTA=92  (54 added, 3 deleted, 35 changed)
    
    
    Revision created by MOE tool push_codebase.
    MOE_MIGRATION=3057
    
    
    git-svn-id: https://gflags.googlecode.com/svn/trunk@61 6586e3c6-dcc4-952a-343f-ff74eb82781d
    874aed5d
Name
Last commit
Last update
doc Loading commit data...
m4 Loading commit data...
packages Loading commit data...
src Loading commit data...
vsprojects Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
Makefile.in Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README_windows.txt Loading commit data...
aclocal.m4 Loading commit data...
autogen.sh Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
depcomp Loading commit data...
google-gflags.sln Loading commit data...
install-sh Loading commit data...
ltmain.sh Loading commit data...
missing Loading commit data...