-
Notifications
You must be signed in to change notification settings - Fork 0
/
CountyDelegate.h
25 lines (24 loc) · 842 Bytes
/
CountyDelegate.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
#pragma once
#include "Citizen.h"
#include "Party.h"
namespace votes
{
class CountyDelegate
{
private:
Citizen* _delegate;
Party* _party;
public:
//ctors/dtors:
CountyDelegate(Citizen* delegate, Party* party) : _delegate(delegate), _party(party) {}
CountyDelegate() { _delegate = nullptr; _party = nullptr; };
~CountyDelegate() {};
// we don't use a "CountyDelegate" by-val initing, but we make sure no code will be using default operator '=' or 'copy ctor' by cancelling them.
CountyDelegate(const CountyDelegate& other) = delete;
CountyDelegate& operator=(const CountyDelegate& other) = delete;
//getters:
const int GetPartySerialOfDeligate()const { return _party->getPartySerial(); }
const string getName() const { return _delegate->getName(); }
const int getID() const { return _delegate->getID(); }
};
}