github.com/benz9527/xboot@v0.0.0-20240504061247-c23f15593274/lib/list/x_com_skl_node_gen.go (about)

     1  // Auto generated code; Do NOT EDIT!
     2  // Author benzheng2121@126.com
     3  
     4  package list
     5  
     6  import (
     7  	"github.com/benz9527/xboot/lib/infra"
     8  )
     9  
    10  func genXComSklNode[K infra.OrderedKey, V any](
    11  	key K,
    12  	val V,
    13  	lvl int32,
    14  ) *xComSklNode[K, V] {
    15  	switch lvl {
    16  	case 1: 
    17  	  n := struct {
    18  		node    xComSklNode[K, V]
    19  		indices [1]*xComSklNode[K, V]
    20  		element xSklElement[K, V]
    21  	  }{
    22  		element: xSklElement[K, V]{
    23  			key: key,
    24  			val: val,
    25  		},
    26  	  }
    27  	  n.node.indices = n.indices[:]
    28  	  n.node.element = &n.element
    29  	  return &n.node
    30  	case 2: 
    31  	  n := struct {
    32  		node    xComSklNode[K, V]
    33  		indices [2]*xComSklNode[K, V]
    34  		element xSklElement[K, V]
    35  	  }{
    36  		element: xSklElement[K, V]{
    37  			key: key,
    38  			val: val,
    39  		},
    40  	  }
    41  	  n.node.indices = n.indices[:]
    42  	  n.node.element = &n.element
    43  	  return &n.node
    44  	case 3: 
    45  	  n := struct {
    46  		node    xComSklNode[K, V]
    47  		indices [3]*xComSklNode[K, V]
    48  		element xSklElement[K, V]
    49  	  }{
    50  		element: xSklElement[K, V]{
    51  			key: key,
    52  			val: val,
    53  		},
    54  	  }
    55  	  n.node.indices = n.indices[:]
    56  	  n.node.element = &n.element
    57  	  return &n.node
    58  	case 4: 
    59  	  n := struct {
    60  		node    xComSklNode[K, V]
    61  		indices [4]*xComSklNode[K, V]
    62  		element xSklElement[K, V]
    63  	  }{
    64  		element: xSklElement[K, V]{
    65  			key: key,
    66  			val: val,
    67  		},
    68  	  }
    69  	  n.node.indices = n.indices[:]
    70  	  n.node.element = &n.element
    71  	  return &n.node
    72  	case 5: 
    73  	  n := struct {
    74  		node    xComSklNode[K, V]
    75  		indices [5]*xComSklNode[K, V]
    76  		element xSklElement[K, V]
    77  	  }{
    78  		element: xSklElement[K, V]{
    79  			key: key,
    80  			val: val,
    81  		},
    82  	  }
    83  	  n.node.indices = n.indices[:]
    84  	  n.node.element = &n.element
    85  	  return &n.node
    86  	case 6: 
    87  	  n := struct {
    88  		node    xComSklNode[K, V]
    89  		indices [6]*xComSklNode[K, V]
    90  		element xSklElement[K, V]
    91  	  }{
    92  		element: xSklElement[K, V]{
    93  			key: key,
    94  			val: val,
    95  		},
    96  	  }
    97  	  n.node.indices = n.indices[:]
    98  	  n.node.element = &n.element
    99  	  return &n.node
   100  	case 7: 
   101  	  n := struct {
   102  		node    xComSklNode[K, V]
   103  		indices [7]*xComSklNode[K, V]
   104  		element xSklElement[K, V]
   105  	  }{
   106  		element: xSklElement[K, V]{
   107  			key: key,
   108  			val: val,
   109  		},
   110  	  }
   111  	  n.node.indices = n.indices[:]
   112  	  n.node.element = &n.element
   113  	  return &n.node
   114  	case 8: 
   115  	  n := struct {
   116  		node    xComSklNode[K, V]
   117  		indices [8]*xComSklNode[K, V]
   118  		element xSklElement[K, V]
   119  	  }{
   120  		element: xSklElement[K, V]{
   121  			key: key,
   122  			val: val,
   123  		},
   124  	  }
   125  	  n.node.indices = n.indices[:]
   126  	  n.node.element = &n.element
   127  	  return &n.node
   128  	case 9: 
   129  	  n := struct {
   130  		node    xComSklNode[K, V]
   131  		indices [9]*xComSklNode[K, V]
   132  		element xSklElement[K, V]
   133  	  }{
   134  		element: xSklElement[K, V]{
   135  			key: key,
   136  			val: val,
   137  		},
   138  	  }
   139  	  n.node.indices = n.indices[:]
   140  	  n.node.element = &n.element
   141  	  return &n.node
   142  	case 10: 
   143  	  n := struct {
   144  		node    xComSklNode[K, V]
   145  		indices [10]*xComSklNode[K, V]
   146  		element xSklElement[K, V]
   147  	  }{
   148  		element: xSklElement[K, V]{
   149  			key: key,
   150  			val: val,
   151  		},
   152  	  }
   153  	  n.node.indices = n.indices[:]
   154  	  n.node.element = &n.element
   155  	  return &n.node
   156  	case 11: 
   157  	  n := struct {
   158  		node    xComSklNode[K, V]
   159  		indices [11]*xComSklNode[K, V]
   160  		element xSklElement[K, V]
   161  	  }{
   162  		element: xSklElement[K, V]{
   163  			key: key,
   164  			val: val,
   165  		},
   166  	  }
   167  	  n.node.indices = n.indices[:]
   168  	  n.node.element = &n.element
   169  	  return &n.node
   170  	case 12: 
   171  	  n := struct {
   172  		node    xComSklNode[K, V]
   173  		indices [12]*xComSklNode[K, V]
   174  		element xSklElement[K, V]
   175  	  }{
   176  		element: xSklElement[K, V]{
   177  			key: key,
   178  			val: val,
   179  		},
   180  	  }
   181  	  n.node.indices = n.indices[:]
   182  	  n.node.element = &n.element
   183  	  return &n.node
   184  	case 13: 
   185  	  n := struct {
   186  		node    xComSklNode[K, V]
   187  		indices [13]*xComSklNode[K, V]
   188  		element xSklElement[K, V]
   189  	  }{
   190  		element: xSklElement[K, V]{
   191  			key: key,
   192  			val: val,
   193  		},
   194  	  }
   195  	  n.node.indices = n.indices[:]
   196  	  n.node.element = &n.element
   197  	  return &n.node
   198  	case 14: 
   199  	  n := struct {
   200  		node    xComSklNode[K, V]
   201  		indices [14]*xComSklNode[K, V]
   202  		element xSklElement[K, V]
   203  	  }{
   204  		element: xSklElement[K, V]{
   205  			key: key,
   206  			val: val,
   207  		},
   208  	  }
   209  	  n.node.indices = n.indices[:]
   210  	  n.node.element = &n.element
   211  	  return &n.node
   212  	case 15: 
   213  	  n := struct {
   214  		node    xComSklNode[K, V]
   215  		indices [15]*xComSklNode[K, V]
   216  		element xSklElement[K, V]
   217  	  }{
   218  		element: xSklElement[K, V]{
   219  			key: key,
   220  			val: val,
   221  		},
   222  	  }
   223  	  n.node.indices = n.indices[:]
   224  	  n.node.element = &n.element
   225  	  return &n.node
   226  	case 16: 
   227  	  n := struct {
   228  		node    xComSklNode[K, V]
   229  		indices [16]*xComSklNode[K, V]
   230  		element xSklElement[K, V]
   231  	  }{
   232  		element: xSklElement[K, V]{
   233  			key: key,
   234  			val: val,
   235  		},
   236  	  }
   237  	  n.node.indices = n.indices[:]
   238  	  n.node.element = &n.element
   239  	  return &n.node
   240  	case 17: 
   241  	  n := struct {
   242  		node    xComSklNode[K, V]
   243  		indices [17]*xComSklNode[K, V]
   244  		element xSklElement[K, V]
   245  	  }{
   246  		element: xSklElement[K, V]{
   247  			key: key,
   248  			val: val,
   249  		},
   250  	  }
   251  	  n.node.indices = n.indices[:]
   252  	  n.node.element = &n.element
   253  	  return &n.node
   254  	case 18: 
   255  	  n := struct {
   256  		node    xComSklNode[K, V]
   257  		indices [18]*xComSklNode[K, V]
   258  		element xSklElement[K, V]
   259  	  }{
   260  		element: xSklElement[K, V]{
   261  			key: key,
   262  			val: val,
   263  		},
   264  	  }
   265  	  n.node.indices = n.indices[:]
   266  	  n.node.element = &n.element
   267  	  return &n.node
   268  	case 19: 
   269  	  n := struct {
   270  		node    xComSklNode[K, V]
   271  		indices [19]*xComSklNode[K, V]
   272  		element xSklElement[K, V]
   273  	  }{
   274  		element: xSklElement[K, V]{
   275  			key: key,
   276  			val: val,
   277  		},
   278  	  }
   279  	  n.node.indices = n.indices[:]
   280  	  n.node.element = &n.element
   281  	  return &n.node
   282  	case 20: 
   283  	  n := struct {
   284  		node    xComSklNode[K, V]
   285  		indices [20]*xComSklNode[K, V]
   286  		element xSklElement[K, V]
   287  	  }{
   288  		element: xSklElement[K, V]{
   289  			key: key,
   290  			val: val,
   291  		},
   292  	  }
   293  	  n.node.indices = n.indices[:]
   294  	  n.node.element = &n.element
   295  	  return &n.node
   296  	case 21: 
   297  	  n := struct {
   298  		node    xComSklNode[K, V]
   299  		indices [21]*xComSklNode[K, V]
   300  		element xSklElement[K, V]
   301  	  }{
   302  		element: xSklElement[K, V]{
   303  			key: key,
   304  			val: val,
   305  		},
   306  	  }
   307  	  n.node.indices = n.indices[:]
   308  	  n.node.element = &n.element
   309  	  return &n.node
   310  	case 22: 
   311  	  n := struct {
   312  		node    xComSklNode[K, V]
   313  		indices [22]*xComSklNode[K, V]
   314  		element xSklElement[K, V]
   315  	  }{
   316  		element: xSklElement[K, V]{
   317  			key: key,
   318  			val: val,
   319  		},
   320  	  }
   321  	  n.node.indices = n.indices[:]
   322  	  n.node.element = &n.element
   323  	  return &n.node
   324  	case 23: 
   325  	  n := struct {
   326  		node    xComSklNode[K, V]
   327  		indices [23]*xComSklNode[K, V]
   328  		element xSklElement[K, V]
   329  	  }{
   330  		element: xSklElement[K, V]{
   331  			key: key,
   332  			val: val,
   333  		},
   334  	  }
   335  	  n.node.indices = n.indices[:]
   336  	  n.node.element = &n.element
   337  	  return &n.node
   338  	case 24: 
   339  	  n := struct {
   340  		node    xComSklNode[K, V]
   341  		indices [24]*xComSklNode[K, V]
   342  		element xSklElement[K, V]
   343  	  }{
   344  		element: xSklElement[K, V]{
   345  			key: key,
   346  			val: val,
   347  		},
   348  	  }
   349  	  n.node.indices = n.indices[:]
   350  	  n.node.element = &n.element
   351  	  return &n.node
   352  	case 25: 
   353  	  n := struct {
   354  		node    xComSklNode[K, V]
   355  		indices [25]*xComSklNode[K, V]
   356  		element xSklElement[K, V]
   357  	  }{
   358  		element: xSklElement[K, V]{
   359  			key: key,
   360  			val: val,
   361  		},
   362  	  }
   363  	  n.node.indices = n.indices[:]
   364  	  n.node.element = &n.element
   365  	  return &n.node
   366  	case 26: 
   367  	  n := struct {
   368  		node    xComSklNode[K, V]
   369  		indices [26]*xComSklNode[K, V]
   370  		element xSklElement[K, V]
   371  	  }{
   372  		element: xSklElement[K, V]{
   373  			key: key,
   374  			val: val,
   375  		},
   376  	  }
   377  	  n.node.indices = n.indices[:]
   378  	  n.node.element = &n.element
   379  	  return &n.node
   380  	case 27: 
   381  	  n := struct {
   382  		node    xComSklNode[K, V]
   383  		indices [27]*xComSklNode[K, V]
   384  		element xSklElement[K, V]
   385  	  }{
   386  		element: xSklElement[K, V]{
   387  			key: key,
   388  			val: val,
   389  		},
   390  	  }
   391  	  n.node.indices = n.indices[:]
   392  	  n.node.element = &n.element
   393  	  return &n.node
   394  	case 28: 
   395  	  n := struct {
   396  		node    xComSklNode[K, V]
   397  		indices [28]*xComSklNode[K, V]
   398  		element xSklElement[K, V]
   399  	  }{
   400  		element: xSklElement[K, V]{
   401  			key: key,
   402  			val: val,
   403  		},
   404  	  }
   405  	  n.node.indices = n.indices[:]
   406  	  n.node.element = &n.element
   407  	  return &n.node
   408  	case 29: 
   409  	  n := struct {
   410  		node    xComSklNode[K, V]
   411  		indices [29]*xComSklNode[K, V]
   412  		element xSklElement[K, V]
   413  	  }{
   414  		element: xSklElement[K, V]{
   415  			key: key,
   416  			val: val,
   417  		},
   418  	  }
   419  	  n.node.indices = n.indices[:]
   420  	  n.node.element = &n.element
   421  	  return &n.node
   422  	case 30: 
   423  	  n := struct {
   424  		node    xComSklNode[K, V]
   425  		indices [30]*xComSklNode[K, V]
   426  		element xSklElement[K, V]
   427  	  }{
   428  		element: xSklElement[K, V]{
   429  			key: key,
   430  			val: val,
   431  		},
   432  	  }
   433  	  n.node.indices = n.indices[:]
   434  	  n.node.element = &n.element
   435  	  return &n.node
   436  	case 31: 
   437  	  n := struct {
   438  		node    xComSklNode[K, V]
   439  		indices [31]*xComSklNode[K, V]
   440  		element xSklElement[K, V]
   441  	  }{
   442  		element: xSklElement[K, V]{
   443  			key: key,
   444  			val: val,
   445  		},
   446  	  }
   447  	  n.node.indices = n.indices[:]
   448  	  n.node.element = &n.element
   449  	  return &n.node
   450  	case 32: 
   451  	  n := struct {
   452  		node    xComSklNode[K, V]
   453  		indices [32]*xComSklNode[K, V]
   454  		element xSklElement[K, V]
   455  	  }{
   456  		element: xSklElement[K, V]{
   457  			key: key,
   458  			val: val,
   459  		},
   460  	  }
   461  	  n.node.indices = n.indices[:]
   462  	  n.node.element = &n.element
   463  	  return &n.node
   464  	default:
   465  	}
   466  	panic("unable to generate ")
   467  }