1// excerpts from http://code.google.com/p/muduo/ 2// 3// Use of this source code is governed by a BSD-style license 4// that can be found in the License file. 5// 6// Author: Shuo Chen (chenshuo at chenshuo dot com) 7 8#ifndef MUDUO_NET_TIMERID_H 9#define MUDUO_NET_TIMERID_H 10 11#include "datetime/copyable.h" 12 13namespace muduo 14{ 15 16class Timer; 17 18/// 19/// An opaque identifier, for canceling Timer. 20/// 21class TimerId : public muduo::copyable 22{ 23 public: 24 explicit TimerId(Timer* timer) 25 : value_(timer) 26 { 27 } 28 29 // default copy-ctor, dtor and assignment are okay 30 31 private: 32 Timer* value_; 33}; 34 35} 36 37#endif // MUDUO_NET_TIMERID_H 38