(self, providerOrSource: Any, format=None)
return provider
Register a topic definition provider. After this method is called, whenever a topic must
        be created, the first definition provider that has a definition for the required topic
        is used to instantiate the topic.

        If providerOrSource is an instance of ITopicDefnProvider, register
        it as a provider of topic definitions. Otherwise, register a new
        instance of TopicDefnProvider(providerOrSource, format). In that case,
        if format is not given, it defaults to TOPIC_TREE_FROM_MODULE. Either
        way, returns the instance of ITopicDefnProvider registered.
Register a topic definition provider. After this method is called, whenever a topic must
        be created, the first definition provider that has a definition for the required topic
        is used to instantiate the topic.
Register a topic definition provider . After this method is called whenever a topic must be created the first definition provider that has a definition for the required topic is used to instantiate the topic .
def addDefnProvider(self, providerOrSource: Any, format=None) -> ITopicDefnProvider:
        """
        Register a topic definition provider. After this method is called, whenever a topic must
        be created, the first definition provider that has a definition for the required topic
        is used to instantiate the topic.

        If providerOrSource is an instance of ITopicDefnProvider, register
        it as a provider of topic definitions. Otherwise, register a new
        instance of TopicDefnProvider(providerOrSource, format). In that case,
        if format is not given, it defaults to TOPIC_TREE_FROM_MODULE. Either
        way, returns the instance of ITopicDefnProvider registered.
        """
        if isinstance(providerOrSource, ITopicDefnProvider):
            provider = providerOrSource
        else:
            from .topicdefnprovider import TopicDefnProvider, TOPIC_TREE_FROM_MODULE
            source = providerOrSource
            provider = TopicDefnProvider(source, format or TOPIC_TREE_FROM_MODULE)
        self.__defnProvider.addProvider(provider)
        return provider
def addDefnProvider ( self , providerOrSource : Any , format = None ) -> ITopicDefnProvider : if isinstance ( providerOrSource , ITopicDefnProvider ) : provider = providerOrSource else : from . topicdefnprovider import TopicDefnProvider , TOPIC_TREE_FROM_MODULE source = providerOrSource provider = TopicDefnProvider ( source , format or TOPIC_TREE_FROM_MODULE ) self . __defnProvider . addProvider ( provider ) return provider