IData.h
Go to the documentation of this file.
1 #ifndef WIRECELL_IDATA
2 #define WIRECELL_IDATA
3 
4 #include <memory> // std::shared_ptr
5 #include <vector>
6 namespace WireCell {
7 
8 
9  template<class Type>
10  class IData {
11  public:
12 
13  virtual ~IData() {}
14 
15  typedef Type value_type;
16 
17  /// Never expose the basic pointer-to-object, but rather only
18  /// through shared, const pointers.
19  typedef std::shared_ptr<const Type> pointer;
20 
21  typedef std::vector<pointer> vector;
22  typedef std::shared_ptr<const vector> shared_vector;
23 
24  // /// Abstract base iterator
25  // typedef IteratorBase<pointer> base_iterator;
26 
27  // /// The facade-iterator which wraps an instance of derived abstract iterator.
28  // typedef Iterator<pointer> iterator;
29 
30  // /// A range of iterators.
31  // typedef boost::iterator_range<iterator> iterator_range;
32 
33  };
34 }
35 
36 // http://antonym.org/2014/02/c-plus-plus-11-range-based-for-loops.html
37 // http://stackoverflow.com/questions/8542591/c11-reverse-range-based-for-loop
38 
39 
40 #endif
std::shared_ptr< const Type > pointer
Definition: IData.h:19
Type value_type
Definition: IData.h:15
std::vector< pointer > vector
Definition: IData.h:21
Definition: Main.h:22
Type
Type of JSON value.
Definition: rapidjson.h:618
std::shared_ptr< const vector > shared_vector
Definition: IData.h:22
virtual ~IData()
Definition: IData.h:13