inline bool query_get_attr(const std::string& query_context, T& ret)
{
    std::string _s;
    if(false == detail::query_get_str(query_context, _s))
        return false;
    ASSERT_WITH_MSG("" != _s, "can not get the arrtibute with\n-----------------------------------------------\n" + query_context);
    ret = boost::lexical_cast<T>(_s);
    return true;
}
Exemple #2
0
	void verify_components(Entity *entity)
	{
		if ( ! entity->has_component<U>()) {
			ASSERT_WITH_MSG(
				false,
				"Entity doesn't have System required component: "
					<< typeid(U).name()
			);
		}
	}