-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFixed_Array.h
71 lines (57 loc) · 1.49 KB
/
Fixed_Array.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef _CS507_FIXED_ARRAY_H_
#define _CS507_FIXED_ARRAY_H_
#include "Array_Base.h"
// include the source file since template class
// COMMENT You were supposed to fixed the LSP violation.
/**
* @class Fixed_Array
*
* Implementation of a fixed size array, i.e., one that is not
* resizeable. It is derived from Array so it can inherit of
* the Array class's methods.
*/
template <typename T, size_t N>
class Fixed_Array : public Array_Base <T>
{
public:
/// Default constructor.
Fixed_Array (void);
/**
* Copy constructor.
*
* @param[in] arr Source array
*/
Fixed_Array (const Fixed_Array <T, N> & arr);
/**
* Initializing constructor. The source array can be of any size
* as long as they are of the same type.
*
* @param[in] arr Source array
*/
template <size_t M>
Fixed_Array (const Fixed_Array <T, M> & arr);
/**
* Initializing constructor. Fills the contents of the
* array with the specified \a fill value.
*
* @param[in] fill The file value.
*/
Fixed_Array (T fill);
/// Destructor.
~Fixed_Array (void);
/**
* Assignment operator
*
* @param[in] rhs Right-hand side of operator.
*/
const Fixed_Array & operator = (const Fixed_Array <T, N> & rhs);
/**
* Assignment operator
*
* @param[in] rhs Right-hand side of operator.
*/
template <size_t M>
const Fixed_Array & operator = (const Fixed_Array <T, M> & rhs);
};
#include "Fixed_Array.cpp"
#endif