-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFullArray.hpp
More file actions
41 lines (30 loc) · 852 Bytes
/
Copy pathFullArray.hpp
File metadata and controls
41 lines (30 loc) · 852 Bytes
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
// FullArray.hpp
//
// Template class for a full (non-sparse) arrays.
//
// (C) Datasim Component Technology 1999
#ifndef FullArray_hpp
#define FullArray_hpp
// Use the STL vector class
#include <vector>
#include "ArrayStructure.cpp"
template <class V, class TA=std::allocator<V> >
class FullArray: public ArrayStructure<V>
{
private:
std::vector<V, TA> m_vector; // Use STL vector class for storage
public:
// Constructors & destructor
FullArray();
FullArray(size_t size);
FullArray(const FullArray<V, TA>& source);
virtual ~FullArray();
// Selectors
virtual size_t Size() const;
// Modifiers
// Operators
V& operator[] (size_t index);
const V& operator[] (size_t index) const;
FullArray<V, TA>& operator = (const FullArray<V, TA>& source);
};
#endif // DSFullArray_hpp