libcopp  1.1.0
util.php
Go to the documentation of this file.
1 <?php
3 
4 function gen_template_params_comment($param_num, $prefix_indent = '', $prefix_msg = '') {
5  $ret = '';
6  for($i = 0; $i < $param_num; ++$i) {
7  $ret .= "$prefix_indent * @param arg$i $prefix_msg parameter $i" . PHP_EOL;
8  }
9 
10  return $ret;
11 }
12 
13 function gen_template_params_typename($param_num, $prefix_msg = '') {
14  $ret = '';
15  for($i = 0; $i < $param_num; ++$i) {
16  if (empty($ret))
17  $ret = "${prefix_msg}typename TARG$i";
18  else
19  $ret .= ", typename TARG$i";
20  }
21 
22  return $ret;
23 }
24 
25 function gen_template_params_type_param($param_num, $prefix_msg = '', $prefix_vol = '') {
26  $ret = '';
27  for($i = 0; $i < $param_num; ++$i) {
28  if (empty($ret))
29  $ret = "${prefix_msg}${prefix_vol}TARG$i arg$i";
30  else
31  $ret .= ",${prefix_vol} TARG$i arg$i";
32  }
33  return $ret;
34 }
35 
36 function gen_template_params_use_param($param_num, $prefix_msg = '', $prefix_vol = '') {
37  $ret = '';
38  for($i = 0; $i < $param_num; ++$i) {
39  if (empty($ret))
40  $ret = "${prefix_msg}${prefix_vol}arg$i";
41  else
42  $ret .= ",${prefix_vol} arg$i";
43  }
44  return $ret;
45 }
gen_template_params_typename($param_num, $prefix_msg= '')
Definition: util.php:13
gen_template_params_use_param($param_num, $prefix_msg= '', $prefix_vol= '')
Definition: util.php:36
gen_template_params_comment($param_num, $prefix_indent= '', $prefix_msg= '')
Definition: util.php:4
$max_param_number
Definition: util.php:2
gen_template_params_type_param($param_num, $prefix_msg= '', $prefix_vol= '')
Definition: util.php:25