SheafSystem  0.0.0.0
record_queue.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 #ifndef RECORD_QUEUE_H
22 #define RECORD_QUEUE_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ANY_H
29 #include "SheafSystem/any.h"
30 #endif
31 
32 #ifndef POD_TYPES_H
33 #include "SheafSystem/pod_types.h"
34 #endif
35 
36 #ifndef STD_QUEUE_H
37 #include "SheafSystem/std_queue.h"
38 #endif
39 
40 
41 namespace sheaf
42 {
43 
50 class SHEAF_DLL_SPEC record_queue : public any
51 {
52 
53  // ===========================================================
55  // ===========================================================
57 
58 public:
59 
63  record_queue();
64 
68  record_queue(const record_queue& xother);
69 
73  virtual ~record_queue();
74 
78  void enqueue(pod_index_type xindex);
79 
84  pod_index_type dequeue();
85 
89  int ct() const;
90 
94  bool is_empty() const;
95 
99  void clear();
100 
101 protected:
102 
103 private:
104 
111  std::queue<pod_index_type> _record_queue;
112 
113 
115 
116 
117  // ===========================================================
119  // ===========================================================
121 
122 public:
123 
129  virtual record_queue* clone() const;
130 
134  virtual bool invariant() const;
135 
139  virtual bool is_ancestor_of(const any* other) const;
140 
141 protected:
142 
143 private:
144 
146 
147 };
148 
149 } // namespace sheaf
150 
151 #endif // ifndef RECORD_QUEUE_H
152 
153 
154 
155 
156 
157 
Abstract base class with useful features for all objects.
Definition: any.h:39
A queue for record read requests.
Definition: record_queue.h:50
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
Namespace for the sheaves component of the sheaf system.