template <typename C>
ComponentHandle<C> component();
-
+
+ template <typename C>
+ const ComponentHandle<const C> component() const;
+
template <typename C>
bool has_component() const;
return manager_->component<C>(id_);
}
+template <typename C>
+const ComponentHandle<const C> Entity::component() const {
+ assert(valid());
+ return manager_->component<const C>(id_);
+}
+
template <typename C>
bool Entity::has_component() const {
assert(valid());