Easemob Windows SDK
embaseobject.h
1 /************************************************************
2  * * EaseMob CONFIDENTIAL
3  * __________________
4  * Copyright (C) 2015 EaseMob Technologies. All rights reserved.
5  *
6  * NOTICE: All information contained herein is, and remains
7  * the property of EaseMob Technologies.
8  * Dissemination of this information or reproduction of this material
9  * is strictly forbidden unless prior written permission is obtained
10  * from EaseMob Technologies.
11  */
12 //
13 // EMBaseObject.h
14 // easemob
15 //
16 // Created by Neil Cao on 15/7/2.
17 //
18 //
19 
20 #ifndef __easemob__EMBaseObject__
21 #define __easemob__EMBaseObject__
22 
23 #include <memory>
24 #include "emdefines.h"
25 
26 namespace easemob
27 {
28  class EASEMOB_API EMBaseObject
29  {
30  public:
31  virtual ~EMBaseObject() {}
32 
33  template <typename T>
34  T* cast() { return static_cast<T*>(this); }
35  };
36 
37  typedef std::shared_ptr<EMBaseObject> EMBaseObjectPtr;
38 
39 }
40 
41 
42 #endif /* defined(__easemob__EMBaseObject__) */
Definition: emattributevalue.h:28
Definition: embaseobject.h:28