12745a763SShuo Chen// excerpts from http://code.google.com/p/muduo/ 22745a763SShuo Chen// 32745a763SShuo Chen// Use of this source code is governed by a BSD-style license 42745a763SShuo Chen// that can be found in the License file. 52745a763SShuo Chen// 62745a763SShuo Chen// Author: Shuo Chen (chenshuo at chenshuo dot com) 72745a763SShuo Chen 82745a763SShuo Chen#ifndef MUDUO_NET_TIMERID_H 92745a763SShuo Chen#define MUDUO_NET_TIMERID_H 102745a763SShuo Chen 112745a763SShuo Chen#include "datetime/copyable.h" 122745a763SShuo Chen 132745a763SShuo Chennamespace muduo 142745a763SShuo Chen{ 152745a763SShuo Chen 162745a763SShuo Chenclass Timer; 172745a763SShuo Chen 182745a763SShuo Chen/// 192745a763SShuo Chen/// An opaque identifier, for canceling Timer. 202745a763SShuo Chen/// 212745a763SShuo Chenclass TimerId : public muduo::copyable 222745a763SShuo Chen{ 232745a763SShuo Chen public: 242745a763SShuo Chen explicit TimerId(Timer* timer) 252745a763SShuo Chen : value_(timer) 262745a763SShuo Chen { 272745a763SShuo Chen } 282745a763SShuo Chen 292745a763SShuo Chen // default copy-ctor, dtor and assignment are okay 302745a763SShuo Chen 312745a763SShuo Chen private: 322745a763SShuo Chen Timer* value_; 332745a763SShuo Chen}; 342745a763SShuo Chen 352745a763SShuo Chen} 362745a763SShuo Chen 372745a763SShuo Chen#endif // MUDUO_NET_TIMERID_H 38