Diffstat (limited to 'include/sitecing/component_so.h') (more/less context) (show 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 | |||
@@ -128,32 +128,38 @@ namespace sitecing { | |||
128 | void attach(component_so *h,acomponent *a); | 128 | void attach(component_so *h,acomponent *a); |
129 | /** | 129 | /** |
130 | * @todo TODO: wish I could remember the details -- document me. | 130 | * @todo TODO: wish I could remember the details -- document me. |
131 | * @param s the source instance. | 131 | * @param s the source instance. |
132 | */ | 132 | */ |
133 | void attach(const so_component& s) { attach(s.hen,s.ac); } | 133 | void attach(const so_component& s) { attach(s.hen,s.ac); } |
134 | /** | 134 | /** |
135 | * @todo TODO: wish I could remember the details -- document me. | 135 | * @todo TODO: wish I could remember the details -- document me. |
136 | */ | 136 | */ |
137 | void detach(); | 137 | void detach(); |
138 | }; | 138 | }; |
139 | 139 | ||
140 | /** | 140 | /** |
141 | * The typed component instance container template. | 141 | * The typed component instance container template. |
142 | * @param CT the component class. | 142 | * @param CT the component class. |
143 | */ | 143 | */ |
144 | template<typename CT> | 144 | template<typename CT> |
145 | class so_component_t : public sitecing::so_component { | 145 | class so_component_t : public sitecing::so_component { |
146 | public: | 146 | public: |
147 | /** | 147 | /** |
148 | * @param s The untyped instance container. | 148 | * @param s The untyped instance container. |
149 | */ | 149 | */ |
150 | so_component_t(const so_component& s) | 150 | so_component_t(const so_component& s) |
151 | : so_component(s) { } | 151 | : so_component(s) { } |
152 | |||
153 | /** | ||
154 | * typed dereference operator | ||
155 | * @return the pointer to the most derived component instance | ||
156 | * @see acomponent::__the_most_derived_this() | ||
157 | */ | ||
152 | CT* operator->() { | 158 | CT* operator->() { |
153 | return static_cast<CT*>(ac->__the_most_derived_this()); | 159 | return static_cast<CT*>(ac->__the_most_derived_this()); |
154 | } | 160 | } |
155 | }; | 161 | }; |
156 | 162 | ||
157 | } | 163 | } |
158 | 164 | ||
159 | #endif /* __SITECING_COMPONENT_SO_H */ | 165 | #endif /* __SITECING_COMPONENT_SO_H */ |