Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::FileLoadMappingRegexp Class Reference

#include "file_load_mapping.h"

Inheritance diagram for net_instaweb::FileLoadMappingRegexp:
net_instaweb::FileLoadMapping net_instaweb::ManuallyRefCounted

Public Member Functions

 FileLoadMappingRegexp (const GoogleString &url_regexp, const GoogleString &filename_prefix)
virtual bool Substitute (StringPiece url, GoogleString *filename) const
- Public Member Functions inherited from net_instaweb::ManuallyRefCounted
void IncrementRefs ()
void DecrementRefs ()

Additional Inherited Members

- Protected Member Functions inherited from net_instaweb::ManuallyRefCounted
virtual ~ManuallyRefCounted ()

Detailed Description

If a mapping is too complicated to represent with a simple literal with FileLoadMappingLiteral, you can use a regexp mapper. For example, if we had: FileLoadMappingRegexp("[^/**])/bar/", "/var/bar/\\1/") that would mean would be found on the filesystem at /var/bar/foo/baz.

Member Function Documentation

virtual bool net_instaweb::FileLoadMappingRegexp::Substitute ( StringPiece  url,
GoogleString filename 
) const

If this mapping applies to this url, put the mapped path into filename and return true. Otherwise return false.

Implements net_instaweb::FileLoadMapping.

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