@@ -170,9 +170,10 @@ class ApplicationContext::ComponentHolder {
170170
171171 // How many paths exist to access this component by type or name.
172172 // Use to detect orphan component cause by type and name conflict.
173- inline size_t accessable_path_number () const noexcept ;
173+ inline size_t accessible_path_number () const noexcept ;
174174
175175 inline const ::std::string& name () const noexcept ;
176+ inline const Id* type_id () const noexcept ;
176177
177178 protected:
178179 // 构造时需要给定必要的类型信息
@@ -293,8 +294,8 @@ class ApplicationContext::ComponentHolder {
293294 int >::type = 0 >
294295 static int initialize (Any&, ApplicationContext&, const Any&) noexcept ;
295296
296- inline void increase_accessable_path () noexcept ;
297- inline void decrease_accessable_path () noexcept ;
297+ inline void increase_accessible_path () noexcept ;
298+ inline void decrease_accessible_path () noexcept ;
298299
299300 inline void set_name (StringView name) noexcept ;
300301
@@ -309,7 +310,7 @@ class ApplicationContext::ComponentHolder {
309310 SingletonState _singleton_state {SingletonState::UNINITIALIZED};
310311 Any _singleton;
311312 size_t _sequence {0 };
312- size_t _accessable_path {0 };
313+ size_t _accessible_path {0 };
313314
314315 friend ApplicationContext;
315316};
@@ -588,15 +589,20 @@ ApplicationContext::ComponentHolder::sequence() const noexcept {
588589}
589590
590591inline ABSL_ATTRIBUTE_ALWAYS_INLINE size_t
591- ApplicationContext::ComponentHolder::accessable_path_number () const noexcept {
592- return _accessable_path ;
592+ ApplicationContext::ComponentHolder::accessible_path_number () const noexcept {
593+ return _accessible_path ;
593594}
594595
595596inline ABSL_ATTRIBUTE_ALWAYS_INLINE const ::std::string&
596597ApplicationContext::ComponentHolder::name () const noexcept {
597598 return _name;
598599}
599600
601+ inline ABSL_ATTRIBUTE_ALWAYS_INLINE const Id*
602+ ApplicationContext::ComponentHolder::type_id () const noexcept {
603+ return &(_type_id->type_id );
604+ }
605+
600606template <typename T>
601607ABSL_ATTRIBUTE_NOINLINE void
602608ApplicationContext::ComponentHolder::set_type () noexcept {
@@ -711,13 +717,13 @@ ABSL_ATTRIBUTE_NOINLINE int ApplicationContext::ComponentHolder::initialize(
711717}
712718
713719inline void
714- ApplicationContext::ComponentHolder::increase_accessable_path () noexcept {
715- _accessable_path ++;
720+ ApplicationContext::ComponentHolder::increase_accessible_path () noexcept {
721+ _accessible_path ++;
716722}
717723
718724inline void
719- ApplicationContext::ComponentHolder::decrease_accessable_path () noexcept {
720- _accessable_path --;
725+ ApplicationContext::ComponentHolder::decrease_accessible_path () noexcept {
726+ _accessible_path --;
721727}
722728
723729inline void ApplicationContext::ComponentHolder::set_name (
0 commit comments