blob: 9b4b0dc115fd219fddecaf2b7fb3e8a567d6d2a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// -*- C++ -*-
// $Id$
// File: Sig_List.h
// Author: Phil Mesnier
#ifndef _SIG_LIST_H_
#define _SIG_LIST_H_
// A Sig_List is a specialized container of signatures. The initial use of a
// Sig_List was to manage a variable length of undefined Signatures, so the
// program could know when all possible resolutions were determined. As the
// program grows in complexity, Sig_Lists are used to store other groups as
// well. The methods provide simple list traversal, as well as efficient use
// of space.
#include "Signature.h"
class Sig_List {
public:
Sig_List (int cap = 500);
~Sig_List ();
void add (const ACE_CString &s);
void add (const Sig_List &other);
void remove (const Signature &s);
void remove_current ();
int index_of (const Signature *s);
int index_of (const ACE_CString &s);
int hasmore();
const Signature *first();
const Signature *next();
int modified ();
int size();
private:
int size_;
int capacity_;
int index_;
int has_nulls_;
int modified_;
Signature ** array_;
};
#endif /* _SIG_LIST_H_ */
|