예제 #1
0
 static mapped_type get(map_type & x, const key_type & v)
 {
    if (x.count(v) != 0)
    {
       return x.at(v);
    }
    else
    {
       PyErr_SetString(PyExc_IndexError, "Index out of range");
       boost::python::throw_error_already_set();
    }
 }
예제 #2
0
      std::shared_ptr<ObjectT> get(const std::string &id) const {
				return has(id) ? _objects.at(id) : nullptr;
			}