-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddress.h
More file actions
43 lines (34 loc) · 886 Bytes
/
address.h
File metadata and controls
43 lines (34 loc) · 886 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
42
/*
* address.h
* PhoenixSim
*
* Created by Johnnie Chan on 7/6/11.
* Copyright 2011 Johnnie Chan. All rights reserved.
*
*/
#ifndef __ADDRESS_H__
#define __ADDRESS_H__
#include <vector>
#include <ostream>
namespace PhoenixSim
{
class Address
{
public:
Address();
~Address();
void SetAddress(int addressPos, int addressValue);
int GetAddress(int addressPos) const;
void SetAddressLength(int length);
int GetAddressLength() const;
bool operator ==(const Address & rhs) const;
bool operator <(const Address & rhs) const;
bool operator !=(const Address & rhs) const;
Address& operator =(const Address& rhs);
friend std::ostream& operator <<(std::ostream& os, Address const &addr);
private:
std::vector<int> addressComponents;
};
std::ostream& operator <<(std::ostream& os, Address const &addr);
}
#endif // __ADDRESS_H__