An unordered collection of unique descriptors with O(1) add/del/has ops. More...
#include <DescriptorSet.h>
![Collaboration graph](classDescriptorSet__coll__graph.png)
Public Member Functions | |
DescriptorSet () | |
~DescriptorSet () | |
bool | has (const int fd) const |
checks whether fd is in the set More... | |
bool | add (int fd) |
adds if unique; returns true if added More... | |
bool | del (int fd) |
deletes if there; returns true if deleted More... | |
int | pop () |
deletes and returns one descriptor, in unspecified order More... | |
const_iterator | begin () const |
begin iterator a la STL; may become invalid if the object is modified More... | |
const_iterator | end () const |
end iterator a la STL; may become invalid if the object is modified More... | |
void | print (std::ostream &os) const |
outputs debugging info about the set More... | |
Public Attributes | |
const typedef int * | const_iterator |
Private Member Functions | |
DescriptorSet (const DescriptorSet &s) | |
DescriptorSet & | operator= (const DescriptorSet &s) |
Private Attributes | |
int * | descriptors_ |
descriptor values in random order More... | |
int * | index_ |
descriptor:position index into descriptors_ More... | |
int | capacity_ |
total number of descriptor slots More... | |
int | size_ |
number of descriptors in the set More... | |
Detailed Description
Definition at line 18 of file DescriptorSet.h.
Constructor & Destructor Documentation
◆ DescriptorSet() [1/2]
DescriptorSet::DescriptorSet | ( | ) |
Definition at line 16 of file DescriptorSet.cc.
References capacity_, descriptors_, index_, and Squid_MaxFD.
◆ ~DescriptorSet()
DescriptorSet::~DescriptorSet | ( | ) |
Definition at line 30 of file DescriptorSet.cc.
References descriptors_, and index_.
◆ DescriptorSet() [2/2]
|
private |
Member Function Documentation
◆ add()
bool DescriptorSet::add | ( | int | fd | ) |
Definition at line 38 of file DescriptorSet.cc.
References assert, capacity_, descriptors_, has(), index_, and size_.
Referenced by commStartHalfClosedMonitor().
◆ begin()
|
inline |
Definition at line 40 of file DescriptorSet.h.
References descriptors_.
Referenced by commHalfClosedCheck(), and end().
◆ del()
bool DescriptorSet::del | ( | int | fd | ) |
Definition at line 55 of file DescriptorSet.cc.
References assert, capacity_, descriptors_, has(), index_, and size_.
Referenced by commStopHalfClosedMonitor().
◆ end()
|
inline |
Definition at line 42 of file DescriptorSet.h.
References begin(), and size_.
Referenced by commHalfClosedCheck().
◆ has()
|
inline |
Definition at line 28 of file DescriptorSet.h.
References capacity_, and index_.
Referenced by add(), commHasHalfClosedMonitor(), and del().
◆ operator=()
|
private |
◆ pop()
int DescriptorSet::pop | ( | ) |
ejects one descriptor in unspecified order
Definition at line 83 of file DescriptorSet.cc.
References assert, capacity_, descriptors_, index_, and size_.
◆ print()
void DescriptorSet::print | ( | std::ostream & | os | ) | const |
Member Data Documentation
◆ capacity_
|
private |
Definition at line 54 of file DescriptorSet.h.
Referenced by add(), del(), DescriptorSet(), has(), and pop().
◆ const_iterator
const typedef int* DescriptorSet::const_iterator |
Definition at line 22 of file DescriptorSet.h.
Referenced by commHalfClosedCheck().
◆ descriptors_
|
private |
Definition at line 52 of file DescriptorSet.h.
Referenced by add(), begin(), del(), DescriptorSet(), pop(), and ~DescriptorSet().
◆ index_
|
private |
Definition at line 53 of file DescriptorSet.h.
Referenced by add(), del(), DescriptorSet(), has(), pop(), and ~DescriptorSet().
◆ size_
|
private |
The documentation for this class was generated from the following files:
- src/DescriptorSet.h
- src/DescriptorSet.cc
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products