Page Speed Optimization Libraries
1.13.35.1
|
#include "rewrite_options.h"
Public Member Functions | |
Property (ValueType default_value, const char *id, StringPiece option_name) | |
void | set_default (ValueType value) |
const ValueType & | default_value () const |
Public Member Functions inherited from net_instaweb::RewriteOptions::PropertyBase | |
PropertyBase (const char *id, StringPiece option_name) | |
virtual void | InitializeOption (RewriteOptions *options) const =0 |
void | set_do_not_use_for_signature_computation (bool x) |
bool | is_used_for_signature_computation () const |
void | set_scope (OptionScope x) |
OptionScope | scope () const |
void | set_help_text (const char *x) |
const char * | help_text () const |
void | set_index (int index) |
const char * | id () const |
StringPiece | option_name () const |
int | index () const |
bool | safe_to_print () const |
void | set_safe_to_print (bool safe_to_print) |
These being protected is against the style guide but necessary to keep them protected while still being used by the Option class hierarchy. Note that iwyu.py incorrectly complains about the template classes but scripts/iwyu manually removes the warning.
Type-specific class of Property. This subclass of PropertyBase knows what sort of value the Option will hold, and so we can put the default value here.
|
inline |
When adding a new Property, we take the default_value by value, not const-reference. This is because when calling AddProperty we may want to use a compile-time constant (e.g. Timer::kHourMs) which does not have a linkable address.