Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for traversing containers

A container and traversal technology, applied in the computer field, can solve problems such as heavy code writing workload and lack of flexibility in containers, and achieve the effect of reducing workload and improving flexibility

Active Publication Date: 2022-03-08
NETEASE (HANGZHOU) NETWORK CO LTD
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, for containers of different nesting types, different codes must be written to achieve traversal. Not only the code writing workload is heavy, but the traversal of containers lacks flexibility

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for traversing containers
  • Method and device for traversing containers
  • Method and device for traversing containers

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0052] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0053] figure 1 The flow of the method for traversing the container provided by the embodiment of the present invention Figure 1 . Such as figure 1 As shown, the method includes:

[0054] S101. Unnesting the nested containers to be traversed to obtain types of multiple containers; wherein, the nested container is a container obtained by nesti...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

Embodiments of the present invention provide a method and device for traversing containers, the method includes: unnesting the nested container to be traversed to obtain the types of multiple containers; wherein, the nested container is obtained by nesting multiple containers container. According to the traversal template corresponding to the type of each container, the content of the nested container is traversed; wherein, the traversal template is a code for traversing the content of the container of the corresponding type. This embodiment can reduce the workload of code writing, and can improve the flexibility of container traversal.

Description

technical field [0001] Embodiments of the present invention relate to computer technology, and in particular to a method and device for traversing containers. Background technique [0002] A container is a commonly used tool in C++. In the process of operating a program containing a container, it is often necessary to traverse the contents of the container to achieve the corresponding operation. [0003] When traversing the content of the container in the prior art, it is usually necessary to first determine the type of the container and the type of the sub-elements contained in the container, and then write the corresponding code according to the type of the container and the type of the sub-elements contained in the container, for the nested type Containers need to use multi-layer loops to traverse the containers. [0004] However, for containers of different nesting types, different codes must be written to achieve traversal. Not only the code writing workload is heavy, ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/20
Inventor 郭昂
Owner NETEASE (HANGZHOU) NETWORK CO LTD