Roxen.git/
server/
etc/
modules/
RXML.pmod/
module.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2005-05-27
2005-05-27 12:34:23 by Martin Stjernholm <mast@lysator.liu.se>
cb616d309402f5d90829fddc870c71de14c1a23a (
26
lines) (+
14
/-
12
)
[
Show
|
Annotate
]
Branch:
5.2
Some autodoc syntax fixes.
Rev: server/etc/modules/RXML.pmod/module.pmod:1.342
2:
// // Created 1999-07-30 by Martin Stjernholm. //
-
// $Id: module.pmod,v 1.
341
2005/05/27 12:
31:
34 mast Exp $
+
// $Id: module.pmod,v 1.
342
2005/05/27 12:
34
:
23
mast Exp $
// Kludge: Must use "RXML.refs" somewhere for the whole module to be // loaded correctly.
300:
//! in the mapping that the @[Frame.get_plugins] returns. //! @item //! The plugin tag is registered in the tag set with the
-
//! identifier
@code{@
[name] + "#" + @[plugin_name]@}.
+
//! identifier
@expr{@
[name] + "#" + @[plugin_name]@}.
//! //! It overrides other plugin tags with that name according to //! the normal tag set rules, but, as said above, is never
660:
//! A tag set for local or additional tags within an RXML tag in a //! Roxen tag module is typically created like this: //!
-
//!
@code{
+
//!
@code
//! RXML.TagSet internal = //! RXML.TagSet(this_module(), "my-tag", //! ({MySubTag1(), MySubTag2(), ...}));
-
//!
@}
+
//!
@endcode
//! //! "my-tag" is the name of the tag that contains the subtags. It's //! typically a good idea to use the name of that tag, since it
1312:
//! value should have. If the value can't be converted to that type, //! an RXML error should be thrown. If you don't want to do any //! special handling of this, it's enough to call
-
//!
@code{@
[type]->encode(value)@}, since the encode functions does
+
//!
@expr{@
[type]->encode(value)@}, since the encode functions does
//! just that. //! //! Some design discussion follows to justify the last paragraph;
1331:
//! is when the value is known to be an arbitrary literal string //! (not zero), which is preferably optimized like this: //!
-
//!
@code{
+
//!
@code
//! return type && type != RXML.t_text ? //! type->encode (my_string, RXML.t_text) : my_string;
-
//!
@}
+
//!
@endcode
//! //! Also, by letting the producer know the type context of the value //! and handle the type conversion, it's possible for the producer
5954:
//! One or more data items can be concatenated with `+. //! @item //! (Sane) parsers are homomorphic on the type, i.e.
-
//!
@code{eval
("da") + eval("ta") == eval("da" + "ta")@} and
-
//!
@code{eval
("data") + eval("") == eval("data")@} provided the
+
//!
@expr{eval
("da") + eval("ta") == eval("da" + "ta")@} and
+
//!
@expr{eval
("data") + eval("") == eval("data")@} provided the
//! data is only split between (sensibly defined) atomic elements. //! @endul
6124:
//! @[type_check]. Assuming the same argument names as in the //! @[type_check] declaration, use like this: //!
-
//!
@code{
+
//!
@code
//! if (value is bogus) //! type_check_error (msg, args, "My error message with %O %O.\n", foo, bar);
-
//!
@}
+
//!
@endcode
{ if (sizeof (args2)) msg2 = sprintf (msg2, @args2); if (msg1) {
9025:
//! variable binding altogether. //! //! Like @[RXML.empty], it holds that nil + anything == anything + nil
-
//! == anything, on the principle that the
@code{+@}
operator in
+
//! == anything, on the principle that the
@expr{+@}
operator in
//! essence is called with one argument in those cases. This avoids //! special handling of tags that return no result in sequential //! types. //! //! For compatibility, @[RXML.nil] can be cast to the empty value for //! the basic Pike types.
-
+
static class Nil { // Only inherit implementation; there's no type-wise significance