Ignore:
Timestamp:
Jul 30, 2015, 8:47:36 PM (10 years ago)
Author:
Frederik Heber <heber@…>
Children:
1b5188
Parents:
73ab25
git-author:
Frederik Heber <heber@…> (06/01/15 08:23:04)
git-committer:
Frederik Heber <heber@…> (07/30/15 20:47:36)
Message:

Added Singleton:getConstInstance() and ..Pointer() functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodePatterns/Singleton.hpp

    r73ab25 r163eec  
    223223
    224224  /**
    225    * returns the instance of this singleton as a pointer
     225   * returns the instance of this Singleton as a reference
    226226   *
    227227   * If no Singleton exists at this point and we are allowed to create one
    228    * a new one is created and stored inside the singleton.
     228   * a new one is created and stored inside the singleton
    229229   *
    230230   * If no automatic creation is allowed, make sure to create an instance first
     
    232232   * would fail.
    233233   */
     234  static const T& getConstInstance();
     235
     236  /**
     237   * returns the instance of this singleton as a pointer
     238   *
     239   * If no Singleton exists at this point and we are allowed to create one
     240   * a new one is created and stored inside the singleton.
     241   *
     242   * If no automatic creation is allowed, make sure to create an instance first
     243   * using the appropriate methods of the derived class. Otherwise this method
     244   * would fail.
     245   */
    234246  static T* getPointer();
     247
     248  /**
     249   * returns the instance of this singleton as a pointer
     250   *
     251   * If no Singleton exists at this point and we are allowed to create one
     252   * a new one is created and stored inside the singleton.
     253   *
     254   * If no automatic creation is allowed, make sure to create an instance first
     255   * using the appropriate methods of the derived class. Otherwise this method
     256   * would fail.
     257   */
     258  static const T* getConstPointer();
    235259
    236260  /**
Note: See TracChangeset for help on using the changeset viewer.