Changeset 20243

Show
Ignore:
Timestamp:
05/22/07 07:12:49 (2 years ago)
Author:
patrick
Message:

Moved destructor implementations into the .cpp file. There is no need for
these to be inlined, especially when they are virtual. No functional changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/gadgeteer/gadget/Type/BaseTypeFactory.cpp

    r19729 r20243  
    5050// Initialize the singleton ptr 
    5151vprSingletonImpWithInitFunc( BaseTypeFactory, hackLoadKnownDevices ); 
     52 
     53BaseTypeFactory::~BaseTypeFactory() 
     54{ 
     55   typedef std::vector<BaseTypeConstructorBase*>::iterator iter_type; 
     56   for ( iter_type itr = mConstructors.begin(); itr != mConstructors.end(); ++itr ) 
     57   { 
     58      if (NULL != *itr) 
     59      { 
     60         delete *itr; 
     61         *itr = NULL; 
     62      } 
     63   } 
     64   mConstructors.clear(); 
     65} 
    5266 
    5367/** 
  • juggler/trunk/modules/gadgeteer/gadget/Type/BaseTypeFactory.h

    r20236 r20243  
    9393   } 
    9494 
    95    ~BaseTypeFactory() 
    96    { 
    97       for (std::vector<BaseTypeConstructorBase*>::iterator itr = mConstructors.begin(); 
    98            itr != mConstructors.end(); itr++) 
    99       { 
    100          if (NULL != *itr) 
    101          { 
    102             delete *itr; 
    103             *itr = NULL; 
    104          } 
    105       } 
    106       mConstructors.clear(); 
    107    } 
     95   ~BaseTypeFactory(); 
    10896 
    10997   // This should be replaced with device plugins. 
  • juggler/trunk/modules/gadgeteer/gadget/Type/DeviceFactory.cpp

    r19854 r20243  
    7373vprSingletonImpWithInitFunc(DeviceFactory, loadKnownDevices); 
    7474 
     75DeviceFactory::~DeviceFactory() 
     76{ 
     77   typedef std::vector<DeviceConstructorBase*>::iterator iter_type; 
     78   for ( iter_type itr = mConstructors.begin(); itr != mConstructors.end(); ++itr ) 
     79   { 
     80      if (NULL != *itr) 
     81      { 
     82         delete *itr; 
     83         *itr = NULL; 
     84      } 
     85   } 
     86   mConstructors.clear(); 
     87} 
     88 
    7589/** 
    7690 * Registers all the devices that I know about. 
  • juggler/trunk/modules/gadgeteer/gadget/Type/DeviceFactory.h

    r20236 r20243  
    5656   } 
    5757 
    58    ~DeviceFactory() 
    59    { 
    60       for (std::vector<DeviceConstructorBase*>::iterator itr = mConstructors.begin(); 
    61            itr != mConstructors.end(); itr++) 
    62       { 
    63          if (NULL != *itr) 
    64          { 
    65             delete *itr; 
    66             *itr = NULL; 
    67          } 
    68       } 
    69       mConstructors.clear(); 
    70    } 
     58   ~DeviceFactory(); 
    7159 
    7260   /** 
  • juggler/trunk/modules/gadgeteer/gadget/Type/PositionProxy.cpp

    r20238 r20243  
    5050{ 
    5151   return PositionProxyPtr(new PositionProxy(deviceName, unitNum)); 
     52} 
     53 
     54PositionProxy::~PositionProxy() 
     55{ 
     56   typedef std::vector<PositionFilter*>::iterator iter_type; 
     57   for ( iter_type itr = mPositionFilters.begin(); itr != mPositionFilters.end(); ++itr ) 
     58   { 
     59      if (NULL != *itr) 
     60      { 
     61         delete *itr; 
     62         *itr = NULL; 
     63      } 
     64   } 
     65   mPositionFilters.clear(); 
    5266} 
    5367 
  • juggler/trunk/modules/gadgeteer/gadget/Type/PositionProxy.h

    r20237 r20243  
    8282                                  const int unitNum = -1); 
    8383 
    84    virtual ~PositionProxy() 
    85    { 
    86       for (std::vector<PositionFilter*>::iterator itr = mPositionFilters.begin(); 
    87            itr != mPositionFilters.end(); itr++) 
    88       { 
    89          if (NULL != *itr) 
    90          { 
    91             delete *itr; 
    92             *itr = NULL; 
    93          } 
    94       } 
    95       mPositionFilters.clear(); 
    96    } 
     84   virtual ~PositionProxy(); 
    9785 
    9886   /**