Page Speed Optimization Libraries  1.4.26.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
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

List of all members.

Public Types

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

Public Member Functions

 PropertyLeaf (ValueType default_value, OptionOffset offset, const char *id, OptionEnum option_enum)
virtual void InitializeOption (RewriteOptions *options) const

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 [inline, virtual]

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines