Page Speed Optimization Libraries  1.2.24.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
net_instaweb::StringMultiMap< StringCompare > Class Template Reference

#include "string_multi_map.h"

List of all members.

Public Member Functions

bool empty ()
void Clear ()
int num_names () const
 Returns the number of distinct names.
int num_values () const
bool Lookup (const StringPiece &name, ConstStringStarVector *values) const
bool Has (const StringPiece &name) const
bool RemoveAll (const StringPiece &var_name)
 Remove all variables by name. Returns true if anything was removed.
const char * name (int index) const
const GoogleStringvalue (int index) const
 Note that the value can be NULL.
void Add (const StringPiece &var_name, const StringPiece &value)
 Add a new variable. The value can be null.
void CopyFrom (const StringMultiMap &string_multi_map)

Detailed Description

template<class StringCompare>
class net_instaweb::StringMultiMap< StringCompare >

Implements an ordered string map, providing case-sensitive and case insensitive versions. The order of insertion is retained and names/value pairs can be accessed by index or looked up by name.


Member Function Documentation

template<class StringCompare>
bool net_instaweb::StringMultiMap< StringCompare >::Lookup ( const StringPiece &  name,
ConstStringStarVector *  values 
) const [inline]

Find the value(s) associated with a variable. Note that you may specify a variable multiple times by calling Add multiple times with the same variable, and each of these values will be returned in the vector.

template<class StringCompare>
int net_instaweb::StringMultiMap< StringCompare >::num_values ( ) const [inline]

Returns the number of distinct values, which can be larger than num_names if Add is called twice with the same name.

template<class StringCompare>
bool net_instaweb::StringMultiMap< StringCompare >::RemoveAll ( const StringPiece &  var_name) [inline]

Remove all variables by name. Returns true if anything was removed.

< Temp variable for new vector.

Note: we have to erase from the map second, because map owns the name.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines