Lumiera  0.pre.03
»edit your freedom«
ref-array.hpp
Go to the documentation of this file.
1 /*
2  REF-ARRAY.hpp - abstraction providing array-like access to a list of references
3 
4  Copyright (C)
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
24 #ifndef LIB_REF_ARRAY_H
25 #define LIB_REF_ARRAY_H
26 
27 
28 #include "lib/nocopy.hpp"
29 
30 
31 namespace lib {
32 
41  template<class T>
42  class RefArray
44  {
45  public:
46  virtual ~RefArray() {}
47 
48  virtual T const& operator[] (size_t i) const =0;
49  virtual size_t size() const =0;
50  };
51 
52 
53 } // namespace lib
54 #endif
Abstraction: Array of const references.
Definition: ref-array.hpp:42
Any copy and copy construction prohibited.
Definition: nocopy.hpp:37
Implementation namespace for support and library code.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
virtual ~RefArray()
this is an interface
Definition: ref-array.hpp:46