! Extracts a named texture out of the container. */
| 183 | |
| 184 | /*! Extracts a named texture out of the container. */ |
| 185 | std::shared_ptr<Texture> getTexture(const char* name) const { |
| 186 | std::map<std::string,Variant>::const_iterator i = m.find(name); |
| 187 | if (i == m.end() || (*i).second.type != Variant::TEXTURE) return std::shared_ptr<Texture>(); |
| 188 | return (*i).second.getTexture(); |
| 189 | } |
| 190 | |
| 191 | /*! Adds a new named element to the container. */ |
| 192 | void add(const std::string& name, Variant data) { |
no test coverage detected