1:
2:
3: /*************
4: * *
5: * SENTINEL *
6: * *
7: *************/
8:
9:
10: #ifndef WWWI_MIND_RRTLIST_H
11: #define WWWI_MIND_RRTLIST_H
12:
13:
14: /**********************
15: * *
16: * COMPILER INCLUDES *
17: * *
18: **********************/
19:
20:
21: #include <list>
22:
23:
24: /*********************
25: * *
26: * PROJECT INCLUDES *
27: * *
28: *********************/
29:
30:
31: #include "question.h"
32: #include "rrt.h"
33:
34:
35: using std::list;
36:
37:
38: /*****************
39: * *
40: * CLASS RRLIST *
41: * *
42: *****************/
43:
44:
45: template <class H> class RRTList : public list< H > {
46: public:
47: unsigned Expire(time_t i_tmNow, time_t &io_tmrNextExpire);
48: typename RRTList<H>::iterator GetRandomRR(void);
49: template <class XRP> bool HasResourceMatch(const XRP ci_xrp) const;
50: bool HasTypeClass(RRType i_ty, RRClass i_cl) const;
51: bool HasQuestionMatch(QuestionConstPtr ci_qnp) const;
52: void Walk(ostream &io_smr, int i_iDepth) const;
53: ~RRTList(void);
54:
55: };
56:
57:
58: /************************
59: * *
60: * FUNCTION PROTOTYPES *
61: * *
62: ************************/
63:
64:
65: template <class T> ostream& operator<<(ostream& io_smr, const RRTList<T> &i_xrr);
66: template <class T> ostream& operator<<(ostream& io_smr, const RRTList<T> *i_xrp);
67:
68:
69: /*********************
70: * *
71: * INLINE FUNCTIONS *
72: * *
73: *********************/
74:
75:
76: #include "rrtlist.i"
77:
78:
79: /************
80: * *
81: * THE END *
82: * *
83: ************/
84:
85:
86: #endif
87:
88:
89: