| 134 | } |
| 135 | |
| 136 | Singleton * |
| 137 | Singleton::get_instance(void) |
| 138 | { |
| 139 | if (Singleton::instance == nullptr) { |
| 140 | try { |
| 141 | Singleton::instance = new Singleton(); |
| 142 | } catch (std::bad_alloc&) { |
| 143 | throw Exception("Failed to allocate Suscan's singleton"); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | return Singleton::instance; |
| 148 | } |
| 149 | |
| 150 | std::string |
| 151 | Singleton::sigutilsVersion(void) |