#include <SegmentFactory.h>
Inheritance diagram for TempSegDestructor:
Public Member Functions | |
TempSegDestructor (SharedSegmentFactory) | |
void | operator() (Segment *pSegment) |
void | operator() (ClosableObject *pClosableObject) |
Private Attributes | |
SharedSegmentFactory | pSegmentFactory |
Definition at line 365 of file SegmentFactory.h.
TempSegDestructor::TempSegDestructor | ( | SharedSegmentFactory | ) | [explicit] |
Definition at line 312 of file SegmentFactory.cpp.
00314 : pSegmentFactory(pSegmentFactoryInit) 00315 { 00316 }
void TempSegDestructor::operator() | ( | Segment * | pSegment | ) |
Definition at line 318 of file SegmentFactory.cpp.
References Segment::getCache(), LinearDeviceSegment::getDeviceId(), ClosableObjectDestructor::operator()(), and pSegmentFactory.
00319 { 00320 LinearDeviceSegment *pLinearDeviceSegment = 00321 dynamic_cast<LinearDeviceSegment *>(pSegment); 00322 SharedCache pCache = pSegment->getCache(); 00323 DeviceId deviceId = pLinearDeviceSegment->getDeviceId(); 00324 // NOTE: pSegment and pLinearDeviceSegment are invalidated here 00325 ClosableObjectDestructor::operator()(pSegment); 00326 pCache->unregisterDevice(deviceId); 00327 pSegmentFactory->deallocateTempDeviceId(deviceId); 00328 }
void ClosableObjectDestructor::operator() | ( | ClosableObject * | pClosableObject | ) | [inline, inherited] |
Definition at line 76 of file ClosableObject.h.
References ClosableObject::close().
Referenced by operator()().
00077 { 00078 pClosableObject->close(); 00079 delete pClosableObject; 00080 }