Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
net_instaweb::RewriteGflags Class Reference

#include "rewrite_gflags.h"

Public Member Functions

 RewriteGflags (const char *progname, int *argc, char ***argv)
 The constructor parses the options.
 
 RewriteGflags ()
 Constructor that does no option parsing. You probably don't want this.
 
bool SetOptions (RewriteDriverFactory *factory, RewriteOptions *options) const
 
bool SetupOptionsOnly (RewriteOptions *options, MessageHandler *handler) const
 Like above, but doesn't expect a RewriteDriverFactory.
 
void SetupFactoryOnly (RewriteDriverFactory *factory) const
 Like above, but only modifies the RewriteDriverFactory.
 
int64 lru_cache_size_bytes () const
 
bool SetRewriters (const char *rewriters_flag_name, const char *rewriters_value, const char *rewrite_level_flag_name, const char *rewrite_level_value, RewriteOptions *options, MessageHandler *handler) const
 

Static Public Member Functions

static bool WasExplicitlySet (const char *name)
 

Detailed Description

Implements rewriter options as command-line options, using the Google "gflags" package.

Member Function Documentation

int64 net_instaweb::RewriteGflags::lru_cache_size_bytes ( ) const

LRU size is potentially needed at factory construction time so it is exposed as a method.

bool net_instaweb::RewriteGflags::SetOptions ( RewriteDriverFactory factory,
RewriteOptions options 
) const

Apply the parsed options to the options and factory. Note that some of the command-line flags control how the factory is constructed, whereas others affect the rewriting options, and should be considered global defaults.

bool net_instaweb::RewriteGflags::SetRewriters ( const char *  rewriters_flag_name,
const char *  rewriters_value,
const char *  rewrite_level_flag_name,
const char *  rewrite_level_value,
RewriteOptions options,
MessageHandler handler 
) const

Sets the rewrite level/list passed on the specified option names & values. The flag names are passed in to provide better error messages.

False is returned if the values cannot be parsed.

static bool net_instaweb::RewriteGflags::WasExplicitlySet ( const char *  name)
static

Determines whether a flag was explicitly set, as opposed to having its default value.


The documentation for this class was generated from the following file: