TempSegDestructor Class Reference

#include <SegmentFactory.h>

Inheritance diagram for TempSegDestructor:

ClosableObjectDestructor List of all members.

Public Member Functions

 TempSegDestructor (SharedSegmentFactory)
void operator() (Segment *pSegment)
void operator() (ClosableObject *pClosableObject)

Private Attributes

SharedSegmentFactory pSegmentFactory

Detailed Description

Definition at line 365 of file SegmentFactory.h.


Constructor & Destructor Documentation

TempSegDestructor::TempSegDestructor ( SharedSegmentFactory   )  [explicit]

Definition at line 312 of file SegmentFactory.cpp.

00314     : pSegmentFactory(pSegmentFactoryInit)
00315 {
00316 }


Member Function Documentation

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     }


Member Data Documentation

SharedSegmentFactory TempSegDestructor::pSegmentFactory [private]

Definition at line 368 of file SegmentFactory.h.

Referenced by operator()().


The documentation for this class was generated from the following files:
Generated on Mon Jun 22 04:00:48 2009 for Fennel by  doxygen 1.5.1