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::RewriteOptions::Properties Class Reference

#include "rewrite_options.h"

Public Member Functions

int size () const
 Returns the number of properties.
 
const PropertyBaseproperty (int index) const
 
PropertyBaseproperty (int index)
 
void Merge (Properties *properties)
 
void push_back (PropertyBase *p)
 

Static Public Member Functions

static bool Initialize (Properties **properties)
 
static bool Terminate (Properties **properties_handle)
 

Detailed Description

Identifies static properties of RewriteOptions that must be initialized before the properties can be used. Primarily for the benefit of unit tests and valgrind sanity, Initialize/Terminate is balance-checked.

Todo:
TODO(jmarantz): Add static properties – currently there are none.

Member Function Documentation

static bool net_instaweb::RewriteOptions::Properties::Initialize ( Properties **  properties)
static

Initializes a static Properties* object. Pass the address of a static member variable. A count is kept of how many times Initialize is called.

True will be returned if this was the first call to initialize the properties object, and this can be used by implementations to decide whether to initialize other static variables.

Initialization is not thread-safe.

void net_instaweb::RewriteOptions::Properties::Merge ( Properties properties)

Merges the passed-in property-vector into this one, sorting the merged properties. Each property's needs its index into the merged vector for initializing subclass-specific Options in each constructor. So this method mutates its input by setting an index field in each property.

static bool net_instaweb::RewriteOptions::Properties::Terminate ( Properties **  properties_handle)
static

Terminates a static Properties* object. Pass the address of a static member variable.

True will be returned if Terminate has been called the same number of times as Initialize is called, and this can be used to decide whether to clean up other static variables.

Termination is not thread-safe.


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