parameters: (self, reg_type, resolved_name, data_class)
docstring: Acquire a L{_TopicImpl} for the specified topic (create one if it
          doesn't exist).  Every L{Topic} instance has a _TopicImpl that
          actually controls the topic resources so that multiple Topic
          instances use the same underlying connections. 'Acquiring' a
          topic implementation marks that another Topic instance is
          using the TopicImpl.
          
          @param resolved_name: resolved topic name
          @type  resolved_name: str
          
          @param reg_type: L{rospy.registration.Registration.PUB} or L{rospy.registration.Registration.SUB}
          @type  reg_type: str
          
          @param data_class: message class for topic
          @type  data_class: L{Message} class
docstring_summary: Acquire a L{_TopicImpl} for the specified topic (create one if it
          doesn't exist).  Every L{Topic} instance has a _TopicImpl that
          actually controls the topic resources so that multiple Topic
          instances use the same underlying connections. 'Acquiring' a
          topic implementation marks that another Topic instance is
          using the TopicImpl.
docstring_tokens: Acquire a L { _TopicImpl } for the specified topic ( create one if it doesn t exist ) . Every L { Topic } instance has a _TopicImpl that actually controls the topic resources so that multiple Topic instances use the same underlying connections . Acquiring a topic implementation marks that another Topic instance is using the TopicImpl .
function: def acquire_impl(self, reg_type, resolved_name, data_class):
          """
          Acquire a L{_TopicImpl} for the specified topic (create one if it
          doesn't exist).  Every L{Topic} instance has a _TopicImpl that
          actually controls the topic resources so that multiple Topic
          instances use the same underlying connections. 'Acquiring' a
          topic implementation marks that another Topic instance is
          using the TopicImpl.
          
          @param resolved_name: resolved topic name
          @type  resolved_name: str
          
          @param reg_type: L{rospy.registration.Registration.PUB} or L{rospy.registration.Registration.SUB}
          @type  reg_type: str
          
          @param data_class: message class for topic
          @type  data_class: L{Message} class
          """
          if reg_type == Registration.PUB:
              rmap = self.pubs
              impl_class = _PublisherImpl
          elif reg_type == Registration.SUB:
              rmap = self.subs
              impl_class = _SubscriberImpl
          else:
              raise TypeError("invalid reg_type: %s"%s)
          with self.lock:
              impl = rmap.get(resolved_name, None)            
              if not impl:
                  impl = impl_class(resolved_name, data_class)
                  self._add(impl, rmap, reg_type)
              impl.ref_count += 1
              return impl
function_tokens: def acquire_impl ( self , reg_type , resolved_name , data_class ) : if reg_type == Registration . PUB : rmap = self . pubs impl_class = _PublisherImpl elif reg_type == Registration . SUB : rmap = self . subs impl_class = _SubscriberImpl else : raise TypeError ( "invalid reg_type: %s" % s ) with self . lock : impl = rmap . get ( resolved_name , None ) if not impl : impl = impl_class ( resolved_name , data_class ) self . _add ( impl , rmap , reg_type ) impl . ref_count += 1 return impl