Public Member Functions

nsCheapStringSet Class Reference

A string set that takes up minimal size when there are 0 or 1 strings in the set. More...

#include <nsCheapSets.h>

List of all members.

Public Member Functions

 nsCheapStringSet ()
 ~nsCheapStringSet ()
nsresult Put (const nsAString &aVal)
 Put a string into the set.
void Remove (const nsAString &aVal)
 Remove a string from the set.
PRBool Contains (const nsAString &aVal)
 Check if the set contains a particular string.

Detailed Description

A string set that takes up minimal size when there are 0 or 1 strings in the set.

Use for cases where sizes of 0 and 1 are even slightly common.


Constructor & Destructor Documentation

nsCheapStringSet::nsCheapStringSet (  )  [inline]
nsCheapStringSet::~nsCheapStringSet (  ) 

Member Function Documentation

PRBool nsCheapStringSet::Contains ( const nsAString aVal  )  [inline]

Check if the set contains a particular string.

Parameters:
aVal the string to check for
Returns:
whether the string is in the set
nsresult nsCheapStringSet::Put ( const nsAString aVal  ) 

Put a string into the set.

Parameters:
aVal the value to put in
void nsCheapStringSet::Remove ( const nsAString aVal  ) 

Remove a string from the set.

Parameters:
aVal the string to remove

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