Changeset 56:f56c9eff6139 in rrlib_design_patterns


Ignore:
Timestamp:
17.06.2012 02:25:34 (7 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Made Destroyed() function in singleton pattern public.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • make.xml

    r54 r56  
    1111      tAutoRegister.h 
    1212      tDoubleDispatcher.h 
    13       tTime.cpp 
    1413      tTypeList.h 
    1514      type_list/* 
  • patterns/singleton/tSingletonHolder.h

    r44 r56  
    9191  } 
    9292 
     93  static bool Destroyed() 
     94  { 
     95    return DestroyedVariable(); 
     96  } 
     97 
    9398//---------------------------------------------------------------------- 
    9499// Private fields and methods 
     
    108113      { 
    109114        TLifetimePolicy<T>::OnDeadReference(); 
    110         tSingletonHolder::Destroyed() = false; 
     115        tSingletonHolder::DestroyedVariable() = false; 
    111116      } 
    112117      tSingletonHolder::InstancePointer() = TCreationPolicy<T>::Create(); 
     
    120125    TCreationPolicy<T>::Destroy(tSingletonHolder::InstancePointer()); 
    121126    tSingletonHolder::InstancePointer() = 0; 
    122     tSingletonHolder::Destroyed() = true; 
     127    tSingletonHolder::DestroyedVariable() = true; 
    123128  } 
    124129 
     
    129134  } 
    130135 
    131   static bool &Destroyed() 
     136  static bool &DestroyedVariable() 
    132137  { 
    133138    static bool destroyed = false; 
Note: See TracChangeset for help on using the changeset viewer.