| 27 | map_.erase( className ); |
| 28 | } |
| 29 | std::shared_ptr<Object> createObject( const std::string & className ) |
| 30 | { |
| 31 | std::unique_lock lock( mutex_ ); |
| 32 | auto it = map_.find( className ); |
| 33 | if ( it == map_.end() ) |
| 34 | return {}; // no name registered |
| 35 | return (*it->second)(); |
| 36 | } |
| 37 | |
| 38 | private: |
| 39 | ObjectMakers() = default; |
no test coverage detected