How to use the pygccxml.declarations.container_traits function in pygccxml

To help you get started, we’ve selected a few pygccxml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gjcarneiro / pybindgen / pybindgen / gccxmlparser.py View on Github external
kwargs = {}
        key_type = None

        if traits is container_traits.list_traits:
            container_type = 'list'
        elif traits is container_traits.deque_traits:
            container_type = 'dequeue'
        elif traits is container_traits.queue_traits:
            container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
            container_type = 'hash_set'
        elif traits is container_traits.hash_multiset_traits:
            container_type = 'hash_multiset'
        elif traits is container_traits.map_traits:
            container_type = 'map'
            if hasattr(traits, "key_type"):
                key_type = traits.key_type(definition)
            else:
                warnings.warn("pygccxml 0.9.5 or earlier don't have the key_type method, "
                              "so we don't support mapping types with this  pygccxml version (%r)"
                              % pygccxml.__version__)
                return
github Gabrielcarvfer / NS3 / 3rd-party / pybindgen / pybindgen / gccxmlparser.py View on Github external
container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
            container_type = 'hash_set'
        elif traits is container_traits.hash_multiset_traits:
            container_type = 'hash_multiset'
        elif traits is container_traits.map_traits:
            container_type = 'map'
            if hasattr(traits, "key_type"):
                key_type = traits.key_type(definition)
            else:
                warnings.warn("pygccxml 0.9.5 or earlier don't have the key_type method, "
                              "so we don't support mapping types with this  pygccxml version (%r)"
                              % pygccxml.__version__)
                return

        elif (traits is container_traits.map_traits
              or traits is container_traits.multimap_traits
              or traits is container_traits.hash_map_traits
              or traits is container_traits.hash_multimap_traits):
            return # maps not yet implemented

        else:
github gjcarneiro / pybindgen / pybindgen / castxmlparser.py View on Github external
def _register_container(self, module, traits, definition, outer_class, name):
        if '<' in name and not self.enable_anonymous_containers:
            return

        kwargs = {}
        key_type = None

        if traits is container_traits.list_traits:
            container_type = 'list'
        elif traits is container_traits.deque_traits:
            container_type = 'dequeue'
        elif traits is container_traits.queue_traits:
            container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
            container_type = 'hash_set'
        elif traits is container_traits.hash_multiset_traits:
            container_type = 'hash_multiset'
        elif traits is container_traits.map_traits:
            container_type = 'map'
            if hasattr(traits, "key_type"):
github gjcarneiro / pybindgen / pybindgen / gccxmlparser.py View on Github external
def _register_container(self, module, traits, definition, outer_class, name):
        if '<' in name and not self.enable_anonymous_containers:
            return

        kwargs = {}
        key_type = None

        if traits is container_traits.list_traits:
            container_type = 'list'
        elif traits is container_traits.deque_traits:
            container_type = 'dequeue'
        elif traits is container_traits.queue_traits:
            container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
            container_type = 'hash_set'
        elif traits is container_traits.hash_multiset_traits:
            container_type = 'hash_multiset'
        elif traits is container_traits.map_traits:
            container_type = 'map'
            if hasattr(traits, "key_type"):
                key_type = traits.key_type(definition)
            else:
github fetchai / ledger / to-sort / python / pybindgen / gccxmlparser.py View on Github external
def _register_container(self, module, traits, definition, outer_class, name):
        if '<' in name and not self.enable_anonymous_containers:
            return

        kwargs = {}
        key_type = None

        if traits is container_traits.list_traits:
            container_type = 'list'
        elif traits is container_traits.deque_traits:
            container_type = 'dequeue'
        elif traits is container_traits.queue_traits:
            container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
            container_type = 'hash_set'
        elif traits is container_traits.hash_multiset_traits:
            container_type = 'hash_multiset'
        elif traits is container_traits.map_traits:
            container_type = 'map'
            if hasattr(traits, "key_type"):
github gjcarneiro / pybindgen / pybindgen / castxmlparser.py View on Github external
kwargs = {}
        key_type = None

        if traits is container_traits.list_traits:
            container_type = 'list'
        elif traits is container_traits.deque_traits:
            container_type = 'dequeue'
        elif traits is container_traits.queue_traits:
            container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
            container_type = 'hash_set'
        elif traits is container_traits.hash_multiset_traits:
            container_type = 'hash_multiset'
        elif traits is container_traits.map_traits:
            container_type = 'map'
            if hasattr(traits, "key_type"):
                key_type = traits.key_type(definition)
            else:
                warnings.warn("pygccxml 0.9.5 or earlier don't have the key_type method, "
                              "so we don't support mapping types with this  pygccxml version (%r)"
                              % pygccxml.__version__)
                return
github gjcarneiro / pybindgen / pybindgen / gccxmlparser.py View on Github external
def _register_container(self, module, traits, definition, outer_class, name):
        if '<' in name and not self.enable_anonymous_containers:
            return

        kwargs = {}
        key_type = None

        if traits is container_traits.list_traits:
            container_type = 'list'
        elif traits is container_traits.deque_traits:
            container_type = 'dequeue'
        elif traits is container_traits.queue_traits:
            container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
github Gabrielcarvfer / NS3 / 3rd-party / pybindgen / pybindgen / gccxmlparser.py View on Github external
def _register_container(self, module, traits, definition, outer_class, name):
        if '<' in name and not self.enable_anonymous_containers:
            return

        kwargs = {}
        key_type = None

        if traits is container_traits.list_traits:
            container_type = 'list'
        elif traits is container_traits.deque_traits:
            container_type = 'dequeue'
        elif traits is container_traits.queue_traits:
            container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
            container_type = 'hash_set'
        elif traits is container_traits.hash_multiset_traits:
            container_type = 'hash_multiset'
        elif traits is container_traits.map_traits:
            container_type = 'map'
            if hasattr(traits, "key_type"):
github gjcarneiro / pybindgen / pybindgen / gccxmlparser.py View on Github external
def _register_container(self, module, traits, definition, outer_class, name):
        if '<' in name and not self.enable_anonymous_containers:
            return

        kwargs = {}
        key_type = None

        if traits is container_traits.list_traits:
            container_type = 'list'
        elif traits is container_traits.deque_traits:
            container_type = 'dequeue'
        elif traits is container_traits.queue_traits:
            container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
            container_type = 'hash_set'
        elif traits is container_traits.hash_multiset_traits:
github gjcarneiro / pybindgen / pybindgen / castxmlparser.py View on Github external
return

        kwargs = {}
        key_type = None

        if traits is container_traits.list_traits:
            container_type = 'list'
        elif traits is container_traits.deque_traits:
            container_type = 'dequeue'
        elif traits is container_traits.queue_traits:
            container_type = 'queue'
        elif traits is container_traits.priority_queue_traits:
            container_type = 'dequeue'
        elif traits is container_traits.vector_traits:
            container_type = 'vector'
        elif traits is container_traits.stack_traits:
            container_type = 'stack'
        elif traits is container_traits.set_traits:
            container_type = 'set'
        elif traits is container_traits.multiset_traits:
            container_type = 'multiset'
        elif traits is container_traits.hash_set_traits:
            container_type = 'hash_set'
        elif traits is container_traits.hash_multiset_traits:
            container_type = 'hash_multiset'
        elif traits is container_traits.map_traits:
            container_type = 'map'
            if hasattr(traits, "key_type"):
                key_type = traits.key_type(definition)
            else:
                warnings.warn("pygccxml 0.9.5 or earlier don't have the key_type method, "
                              "so we don't support mapping types with this  pygccxml version (%r)"