-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathElement.h
56 lines (47 loc) · 1.09 KB
/
Element.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
/*
Archive: Element.h
Author: David T. Montoya
<davidtovarmontoya@gmail.com>
start date: 2020-11-20
last date modified 2021-3-13
Version: 0.1
licence: GPL
*/
#include<iostream>
#include<string>
using namespace std;
#ifndef HH_ELEMENT
#define HH_ELEMENT
template<class TIPO>
class Element
{
private:
TIPO Value;
Element<TIPO> *next;
public:
/** Constructor
*/
Element(TIPO item, Element<TIPO> *next);
/** Destructor. No hace nada
*/
~Element();
/** Return value of linked Element<TIPO>,
*/
TIPO valueNext();
/** value next element (type of data that you declared)
*/
void changeNext(Element<TIPO> *replacer);
/** replace pointer to next element
*/
Element<TIPO> *pointerNext();
/** return pointer to next element (type of data that you declared)
*/
TIPO value();
/** return Value (type of data that you declared)**/
void operator = (const TIPO &newValue);
/** replaces value. now is newValue (type of data that you declared) */
};
#include"Element.tpp"
#else
template<class TIPO> class Element;
#endif