Merge pull request #85 from javeme/monitor-copy

Implement copy constructor for class Monitor
This commit is contained in:
Emiel Bruijntjes 2016-07-18 04:41:14 -04:00 committed by GitHub
commit 3ceeeb9204
1 changed files with 10 additions and 0 deletions

View File

@ -57,6 +57,16 @@ public:
_watchable->add(this);
}
/**
* Copy constructor
* @param monitor
*/
Monitor(const Monitor &monitor) : _watchable(monitor._watchable)
{
// register with the watchable
_watchable->add(this);
}
/**
* Destructor
*/