41 #ifndef _doublebufferedresource_h
42 #define _doublebufferedresource_h
88 }
catch(std::exception& e){
90 {
delete ResourceA; ResourceA=0; }
92 {
delete ResourceB; ResourceB=0; }
106 { std::swap(ResourceA,ResourceB); }
111 {
return ResourceA; }
116 {
return ResourceB; }
121 {
return *ResourceA; }
126 {
return *ResourceB; }
149 std::vector<ConvertiblePointer> ThreadResources;
157 Scheduler(Scheduler_)
165 template <
typename DBR>
167 {
return *((DBR*)(this->ThreadResources[ResourceID])); }
173 {
return GetResource<DoubleBufferedLogger>(
DBRLogger).GetUsable(); }
182 {
return Scheduler; }
186 { GetResource<DoubleBufferedLogger>(
DBRLogger).SwapUsableAndCommitable(); }