HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_IOObject.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_IOObject.h
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __UT_IOOBJECT_H__
13 #define __UT_IOOBJECT_H__
14 
15 #include "UT_API.h"
16 #include "UT_NonCopyable.h"
17 
18 /// This tracks the number of objects that are still active and need to be
19 /// cleaned up prior to exiting the execution context event loop. If an object
20 /// does not live within an event loop this does not need to be added (i.e.
21 /// background IO thread worker).
23 {
24 public:
25  /// The number of objects still living within the event loop.
26  static int count();
27 
28 protected:
29  UT_IOObject();
30  ~UT_IOObject();
32 };
33 
34 /// This provides a way to cancel an IO object. Typically this will be used for
35 /// timers that need to be cancelled now that the event loop has been stopped.
37 {
38 public:
40  virtual ~UT_TrackedIOObject();
42 
43  static void cancelAll();
44  virtual void cancel() = 0;
45 
46 private:
47 };
48 
49 #endif // __UT_IOOBJECT_H__
50 
#define UT_API
Definition: UT_API.h:14
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.