Diffstat (limited to 'include/sitecing/component_so.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | include/sitecing/component_so.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sitecing/component_so.h b/include/sitecing/component_so.h index 3239d4a..3daceef 100644 --- a/include/sitecing/component_so.h +++ b/include/sitecing/component_so.h @@ -140,20 +140,26 @@ namespace sitecing { /** * The typed component instance container template. * @param CT the component class. */ template<typename CT> class so_component_t : public sitecing::so_component { public: /** * @param s The untyped instance container. */ so_component_t(const so_component& s) : so_component(s) { } + + /** + * typed dereference operator + * @return the pointer to the most derived component instance + * @see acomponent::__the_most_derived_this() + */ CT* operator->() { return static_cast<CT*>(ac->__the_most_derived_this()); } }; } #endif /* __SITECING_COMPONENT_SO_H */ |