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

#include "rewrite_options.h"

Inheritance diagram for net_instaweb::RewriteOptions::PropertyLeaf< RewriteOptionsSubclass, OptionClass >:
net_instaweb::RewriteOptions::Property< OptionClass::ValueType > net_instaweb::RewriteOptions::PropertyBase

Public Types

typedef OptionClass
RewriteOptionsSubclass::* 
OptionOffset
 
typedef OptionClass::ValueType ValueType
 

Public Member Functions

 PropertyLeaf (ValueType default_value, OptionOffset offset, const char *id, StringPiece option_name)
 
virtual void InitializeOption (RewriteOptions *options) const
 
- Public Member Functions inherited from net_instaweb::RewriteOptions::Property< OptionClass::ValueType >
 Property (OptionClass::ValueTypedefault_value, const char *id, StringPiece option_name)
 
void set_default (OptionClass::ValueTypevalue)
 
const OptionClass::ValueType & default_value () const
 
- Public Member Functions inherited from net_instaweb::RewriteOptions::PropertyBase
 PropertyBase (const char *id, StringPiece option_name)
 
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 RewriteOptionsSubclass, class OptionClass>
class net_instaweb::RewriteOptions::PropertyLeaf< RewriteOptionsSubclass, OptionClass >

Leaf subclass of Property<ValueType>, which is templated on the class of the corresponding Option. The template parameters here are RewriteOptionsSubclass – the subclass of RewriteOptions in which this option is instantiated, e.g. ApacheConfig. OptionClass – the subclass of OptionBase that is being instantiated in each RewriteOptionsSubclass. These template parameters are generally automatically discovered by the compiler when AddProperty is called.

Todo:
TODO(jmarantz): It looks tempting to fold Property<T> and PropertyLeaf<T> together, but this is difficult because of the way that the Option class hiearchy is structured and the precision of C++ pointers-to-members. Attempting that is probably a worthwhile follow-up task.

Member Typedef Documentation

template<class RewriteOptionsSubclass, class OptionClass>
typedef OptionClass RewriteOptionsSubclass::* net_instaweb::RewriteOptions::PropertyLeaf< RewriteOptionsSubclass, OptionClass >::OptionOffset

Fancy C++ pointers to members; a typesafe version of offsetof. See http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp? topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr034.htm

Member Function Documentation

template<class RewriteOptionsSubclass, class OptionClass>
virtual void net_instaweb::RewriteOptions::PropertyLeaf< RewriteOptionsSubclass, OptionClass >::InitializeOption ( RewriteOptions options) const
inlinevirtual

Connect the specified RewriteOption to this property. set_index() must previously have been called on this.

Implements net_instaweb::RewriteOptions::PropertyBase.


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