Changeset 132 for trunk/nv/singleton.hh
- Timestamp:
- 06/25/13 18:43:24 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/singleton.hh
r110 r132 19 19 { 20 20 /** 21 * singleton22 * @brief Represents an accessible static object that will only have one instance.21 * singleton 22 * @brief Represents an accessible static object that will only have one instance. 23 23 */ 24 24 template <class T> … … 31 31 32 32 /** 33 * Creates the single instance if one doesn't already exist.33 * Creates the single instance if one doesn't already exist. 34 34 */ 35 35 singleton() … … 40 40 41 41 /** 42 * Destroys the instance.42 * Destroys the instance. 43 43 */ 44 44 ~singleton() … … 50 50 public: 51 51 /** 52 * Checks to see if the instance exists.52 * Checks to see if the instance exists. 53 53 * 54 * @returns True if this singleton has an instance assigned, false otherwise.54 * @returns True if this singleton has an instance assigned, false otherwise. 55 55 */ 56 56 static bool is_valid() … … 60 60 61 61 /** 62 * Returns the pointer to the instance.62 * Returns the pointer to the instance. 63 63 * 64 * @returns The pointer to the instance.64 * @returns The pointer to the instance. 65 65 */ 66 66 static T *pointer() … … 70 70 } 71 71 /** 72 * Returns the object referenced by this singleton.72 * Returns the object referenced by this singleton. 73 73 */ 74 74 static T &reference() … … 84 84 85 85 /** 86 * auto_singleton87 * @brief Represents a singleton that automatically creates an instance if one doesn't already exist.86 * auto_singleton 87 * @brief Represents a singleton that automatically creates an instance if one doesn't already exist. 88 88 */ 89 89 template <class T> … … 92 92 public: 93 93 /** 94 * Returns the pointer to the instance. Makes an instance if one doesn't already exist.94 * Returns the pointer to the instance. Makes an instance if one doesn't already exist. 95 95 */ 96 96 static T *pointer() … … 104 104 105 105 /** 106 * Returns the object referenced by this singleton. Makes an instance if one doesn't already exist.106 * Returns the object referenced by this singleton. Makes an instance if one doesn't already exist. 107 107 */ 108 108 static T &reference()
Note: See TracChangeset
for help on using the changeset viewer.