Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::RewriteOptions::Property< ValueType > Class Template Reference

#include "rewrite_options.h"

Inheritance diagram for net_instaweb::RewriteOptions::Property< ValueType >:
net_instaweb::RewriteOptions::PropertyBase

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)
 

Detailed Description

template<class ValueType>
class net_instaweb::RewriteOptions::Property< ValueType >

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.

Constructor & Destructor Documentation

template<class ValueType>
net_instaweb::RewriteOptions::Property< ValueType >::Property ( ValueType  default_value,
const char *  id,
StringPiece  option_name 
)
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.


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