Public Member Functions

nsCheapInt32Set Class Reference

An integer set that takes up only 4 bytes when there are 0 or 1 integers in the set. More...

#include <nsCheapSets.h>

List of all members.

Public Member Functions

 nsCheapInt32Set ()
 ~nsCheapInt32Set ()
nsresult Put (PRInt32 aVal)
 Put an int into the set.
void Remove (PRInt32 aVal)
 Remove a int from the set.
PRBool Contains (PRInt32 aVal)
 Check if the set contains a particular int.

Detailed Description

An integer set that takes up only 4 bytes when there are 0 or 1 integers in the set.

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


Constructor & Destructor Documentation

nsCheapInt32Set::nsCheapInt32Set (  )  [inline]
nsCheapInt32Set::~nsCheapInt32Set (  ) 

Member Function Documentation

PRBool nsCheapInt32Set::Contains ( PRInt32  aVal  )  [inline]

Check if the set contains a particular int.

Parameters:
aVal the int to check for
Returns:
whether the int is in the set
nsresult nsCheapInt32Set::Put ( PRInt32  aVal  ) 

Put an int into the set.

void nsCheapInt32Set::Remove ( PRInt32  aVal  ) 

Remove a int from the set.

Parameters:
aVal the int to remove

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