00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef CNTM_ASYNCPROCRESULTIMPL_H
00015 #define CNTM_ASYNCPROCRESULTIMPL_H
00016 #include <Cntm/AsyncProc/AsyncProcResultDef.h>
00017 #include <Cntm/AsyncProc/AsyncProc.h>
00018
00019 template < typename ResT > template < typename ClassT, typename MethodT >
00020 Cntm::AsyncProcResult<ResT>& Cntm::AsyncProcResult<ResT>::BindFinishToThreadProc(
00021 ClassT Object,
00022 MethodT Method,
00023 ThreadPriority Priority,
00024 bool HoldRef)
00025 {
00026 SetFinishProc(AsyncProc::SuspendThread(
00027 Object, Method, Priority, HoldRef)(*this));
00028 return *this;
00029 }
00030
00031 template < typename ResT > template < typename ClassT, typename MethodT >
00032 Cntm::AsyncProcResult<ResT>& Cntm::AsyncProcResult<ResT>::BindFinishToDeferProc(
00033 ClassT Object,
00034 MethodT Method,
00035 Cntm::SynchroSpace::Ptr Space,
00036 bool HoldRef)
00037 {
00038 SetFinishProc(AsyncProc::SuspendDefer(
00039 Object, Method, Space, HoldRef)(*this));
00040 return *this;
00041 }
00042
00043 template < typename ResT > template < typename ClassT, typename MethodT >
00044 Cntm::AsyncProcResult<ResT>& Cntm::AsyncProcResult<ResT>::BindFinishToDirectProc(
00045 ClassT Object,
00046 MethodT Method,
00047 bool HoldRef)
00048 {
00049 SetFinishProc(AsyncProc::SuspendDirect(
00050 Object, Method, HoldRef)(*this));
00051 return *this;
00052 }
00053
00054
00055 template < typename ClassT, typename MethodT >
00056 Cntm::AsyncProcResult<void>& Cntm::AsyncProcResult<void>::BindFinishToThreadProc(
00057 ClassT Object,
00058 MethodT Method,
00059 ThreadPriority Priority,
00060 bool HoldRef)
00061 {
00062 SetFinishProc(AsyncProc::SuspendThread(
00063 Object, Method, Priority, HoldRef)(*this));
00064 return *this;
00065 }
00066
00067 template < typename ClassT, typename MethodT >
00068 Cntm::AsyncProcResult<void>& Cntm::AsyncProcResult<void>::BindFinishToDeferProc(
00069 ClassT Object,
00070 MethodT Method,
00071 Cntm::SynchroSpace::Ptr Space,
00072 bool HoldRef)
00073 {
00074 SetFinishProc(AsyncProc::SuspendDefer(
00075 Object, Method, Space, HoldRef)(*this));
00076 return *this;
00077 }
00078
00079 template < typename ClassT, typename MethodT >
00080 Cntm::AsyncProcResult<void>& Cntm::AsyncProcResult<void>::BindFinishToDirectProc(
00081 ClassT Object,
00082 MethodT Method,
00083 bool HoldRef)
00084 {
00085 SetFinishProc(AsyncProc::SuspendDirect(
00086 Object, Method, HoldRef)(*this));
00087 return *this;
00088 }
00089
00090 #endif //CNTM_ASYNCPROCRESULTIMPL_H