-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttribute.h
More file actions
76 lines (60 loc) · 1.63 KB
/
Copy pathAttribute.h
File metadata and controls
76 lines (60 loc) · 1.63 KB
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
72
73
74
75
/*
* File: Attribute.h
* Author: Arthur Lisek-Koper
* e-mail: arthur_lisekkoper@student.uml.edu
*
* Created on October 21, 2014, 2:41 PM
* Last modified on October 23, 2014.
*
* This code is used to contain the attributes present within each element
* of an xml document, if any exist.
*/
#ifndef ATTRIBUTE_H
#define ATTRIBUTE_H
#include <string>
using namespace std;
/**
* This class holds the attribute information of a single attribute found within
* an element from an xml document.
*/
class Attribute {
public:
///Default constructor created by Netbeans.
Attribute();
/**
* Constructor that assigns the name and value of the Attribute object.
* @param attr_name - Name of the attribute.
* @param attr_value - Value of the attribute.
*/
Attribute(string attr_name, string attr_value);
///Default copy constructor created by Netbeans.
Attribute(const Attribute& orig);
///Default destructor created by Netbeans.
virtual ~Attribute();
/**
* Setter function for 'value'
* @param new content of 'value' to be set.
*/
void setValue(string value);
/**
* Getter function for 'value'
* @return the content of 'value'.
*/
string getValue() const;
/**
* Setter function for 'name'
* @param new content of 'name' to be set.
*/
void setName(string name);
/**
* Getter function for 'name'
* @return the content of 'name'.
*/
string getName() const;
private:
///Name of the attribute.
string name;
///Value of the attribute.
string value;
};
#endif /* ATTRIBUTE_H */