From a8c8b832a7444dc7939df5e027b94c0603003b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Thu, 24 Jul 2003 18:08:48 +0200 Subject: [PATCH] Added some AutoDoc markup. Rev: lib/modules/Array.pmod:1.89 Rev: lib/modules/Getopt.pmod:1.28 Rev: lib/modules/Mapping.pmod:1.3 Rev: src/iterators.cmod:1.43 --- lib/modules/Array.pmod | 17 ++++++++++++++++- lib/modules/Getopt.pmod | 15 ++++++++++++--- lib/modules/Mapping.pmod | 2 ++ src/iterators.cmod | 19 +++++++++++++++++-- 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/lib/modules/Array.pmod b/lib/modules/Array.pmod index 7c7a6bc034..397e75a547 100644 --- a/lib/modules/Array.pmod +++ b/lib/modules/Array.pmod @@ -8,6 +8,8 @@ constant diff_compare_table = __builtin.diff_compare_table; constant longest_ordered_sequence = __builtin.longest_ordered_sequence; constant interleave_array = __builtin.interleave_array; +constant diff_dyn_longest_sequence = __builtin.diff_dyn_longest_sequence; + constant sort = predef::sort; constant everynth = __builtin.everynth; constant splice = __builtin.splice; @@ -209,7 +211,16 @@ array sort_array(array foo, function|void cmp, mixed ... args) return foo; } -array columns(array x, array ind) +//! Get multiple columns from an array. +//! +//! This function is equvivalent to +//! @pre{ +//! map(ind, lambda(mixed i) { return column(x, i); }) +//! @} +//! +//! @seealso +//! @[column()] +array(array) columns(array x, array ind) { array ret=allocate(sizeof(ind)); for(int e=0;e<sizeof(ind);e++) ret[e]=column(x,ind[e]); @@ -226,6 +237,10 @@ array transpose_old(array(array|string) x) // diff3, complement to diff +//! Return the three-way difference between the arrays. +//! +//! @seealso +//! @[Array.diff()], @[Array.diff_longest_sequence()] array(array(array)) diff3 (array a, array b, array c) { // This does not necessarily produce the optimal sequence between diff --git a/lib/modules/Getopt.pmod b/lib/modules/Getopt.pmod index bc02e3dcb2..ecce0714a4 100644 --- a/lib/modules/Getopt.pmod +++ b/lib/modules/Getopt.pmod @@ -169,13 +169,22 @@ string|int(0..1) find_option(array(string) argv, return def; } -//! +//! Used with @[find_all_options()] to indicate that an option +//! requires an argument. +//! @seealso +//! @[find_all_options()] constant HAS_ARG=1; -//! +//! Used with @[find_all_options()] to indicate that an option +//! does not take an argument. +//! @seealso +//! @[find_all_options()] constant NO_ARG=2; -//! +//! Used with @[find_all_options()] to indicate that an option +//! takes an optional argument. +//! @seealso +//! @[find_all_options()] constant MAY_HAVE_ARG=3; diff --git a/lib/modules/Mapping.pmod b/lib/modules/Mapping.pmod index 5f59bb85ba..ec7a687f77 100644 --- a/lib/modules/Mapping.pmod +++ b/lib/modules/Mapping.pmod @@ -1,6 +1,8 @@ #pike __REAL_VERSION__ #pragma strict_types +//! Alias for @[m_delete()] constant delete=m_delete; + constant Iterator = __builtin.mapping_iterator; diff --git a/src/iterators.cmod b/src/iterators.cmod index ca37724df3..ca767b9c71 100644 --- a/src/iterators.cmod +++ b/src/iterators.cmod @@ -2,11 +2,11 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: iterators.cmod,v 1.42 2003/05/30 23:19:26 mast Exp $ +|| $Id: iterators.cmod,v 1.43 2003/07/24 15:56:48 grubba Exp $ */ #include "global.h" -RCSID("$Id: iterators.cmod,v 1.42 2003/05/30 23:19:26 mast Exp $"); +RCSID("$Id: iterators.cmod,v 1.43 2003/07/24 15:56:48 grubba Exp $"); #include "main.h" #include "object.h" #include "mapping.h" @@ -380,6 +380,16 @@ PIKECLASS mapping_iterator } }; +/*! @module Array + */ +/*! @class Iterator + *! + *! An object of this class is returned by @[get_iterator()] when + *! called with an array. + *! + *! @seealso + *! @[get_iterator] + */ PIKECLASS array_iterator { CVAR int pos; @@ -477,6 +487,11 @@ PIKECLASS array_iterator }; +/*! @endclass + */ +/*! @endmodule + */ + #ifdef PIKE_NEW_MULTISETS PIKECLASS multiset_iterator -- GitLab