Page Speed Optimization Libraries  1.7.30.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
net_instaweb::RewriteOptions::Properties Class Reference

#include "rewrite_options.h"

List of all members.

Public Member Functions

int size () const
 Returns the number of properties.
const PropertyBase * property (int index) const
PropertyBase * property (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.

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