VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
asyncJobMapEntry.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright 2010 VT MAK
3 *******************************************************************************/
4 
5 
8 
9 #pragma once
10 
11 #include "vrfutil/vrfutilDefines.h"
12 
13 #include "asyncJobServer.h"
14 
15 #include <stdlib.h>
16 #include <memory>
17 
18 #include <tbb/spin_rw_mutex.h>
19 
20 #include <vrfutil/objectCounter.h>
21 
30 #ifdef DtObjectDebugger_Enable
31  : public DtObjectDebugger<DtAsyncJobMapEntry>
32 #endif
33 {
34 public:
36 
38  virtual ~DtAsyncJobMapEntry();
39 
41  virtual size_t id();
42 
44  virtual DtAsyncJobServer& server();
45 
47  virtual DtAsyncJobStatus status() const;
48 
50  virtual const DtAsyncJobResult* result() const;
51 
53  virtual void setStatus(DtAsyncJobStatus status);
54 
56  virtual void setResult(DtAsyncJobStatus status, DtAsyncJobResult* result = 0);
57 
58 protected:
59  typedef tbb::spin_rw_mutex Mutex;
60 
61  mutable Mutex myMutex;
63  size_t myId;
65  std::unique_ptr<DtAsyncJobResult> myResult;
66 };
67 
Mutex myMutex
Definition: asyncJobMapEntry.h:61
DtAsyncJobStatus
State of job.
Definition: asyncJobServer.h:33
std::unique_ptr< DtAsyncJobResult > myResult
Definition: asyncJobMapEntry.h:65
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:31
Default on in debug, off in release.
Definition: objectCounter.h:27
size_t myId
Definition: asyncJobMapEntry.h:63
tbb::spin_rw_mutex Mutex
Definition: asyncJobMapEntry.h:59
Base class for result of job.
Definition: asyncJobServer.h:43
DtAsyncJobServer * myServer
Definition: asyncJobMapEntry.h:62
Handle to async job.
Definition: asyncJobMapEntry.h:29
DtAsyncJobStatus myStatus
Definition: asyncJobMapEntry.h:64
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
Manages async job objects.
Definition: asyncJobServer.h:61

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)