DocBook: The Definitive Guide

docbook: the definitive guide
By Norman Walsh & Leonard Muellner
1st Edition October 1999
1-56592-580-7, Order Number: 5807
652 pages, $36.95 , Includes CD-ROM

DocBook: The Definitive Guide
PrevNext

Name

FuncParams -- Parameters for a function referenced through a function pointer in a synopsis

Synopsis

Mixed Content Model

FuncParams ::= ((#PCDATA|Link|OLink|ULink|Action|Application|ClassName|Command|   ComputerOutput|Database|Email|EnVar|ErrorCode|ErrorName|   ErrorType|Filename|Function|GUIButton|GUIIcon|GUILabel|GUIMenu|   GUIMenuItem|GUISubmenu|Hardware|Interface|InterfaceDefinition|   KeyCap|KeyCode|KeyCombo|KeySym|Literal|Constant|Markup|   MediaLabel|MenuChoice|MouseButton|MsgText|Option|Optional|   Parameter|Prompt|Property|Replaceable|ReturnValue|SGMLTag|   StructField|StructName|Symbol|SystemItem|Token|Type|UserInput|   VarName|Anchor|Comment|Subscript|Superscript|InlineGraphic|   InlineMediaObject|IndexTerm)*)

Attributes

Common attributes

Tag Minimization

Both the start- and end-tags are required for this element.

Description

In some programming languages (like C), it is possible for a function to have a pointer to another function as one of its parameters. In the syntax summary for such a function, the FuncParams element provides a wrapper for the function pointer.

For example, the following prototype describes the function sort, which takes two parameters. The first parameter, arr, is an array of integers. The second parameter is a pointer to a function, comp that returns an int. The comp function takes two parameters, both of type int *:

<funcprototype>   <funcdef>void <function>sort</function></funcdef>     <paramdef>int *<parameter>arr</parameter>[]</paramdef>     <paramdef>int <parameter>(* comp)</parameter>       <funcparams>int *, int *</funcparams></paramdef> </funcprototype>

Processing expectations

Formatted inline. For a complete description of the processing expecations, see FuncSynopsis.

(4.0) Future Changes

The InterfaceDefinition element will be discarded in DocBook V4.0. It will no longer be available in the content model of this element.

Parents

These elements contain FuncParams: ParamDef.

Children

The following elements occur in FuncParams: Action, Anchor, Application, ClassName, Command, Comment, ComputerOutput, Constant, Database, Email, EnVar, ErrorCode, ErrorName, ErrorType, Filename, Function, GUIButton, GUIIcon, GUILabel, GUIMenu, GUIMenuItem, GUISubmenu, Hardware, IndexTerm, InlineGraphic, InlineMediaObject, Interface, InterfaceDefinition, KeyCap, KeyCode, KeyCombo, KeySym, Link, Literal, Markup, MediaLabel, MenuChoice, MouseButton, MsgText, OLink, Option, Optional, Parameter, Prompt, Property, Replaceable, ReturnValue, SGMLTag, StructField, StructName, Subscript, Superscript, Symbol, SystemItem, Token, Type, ULink, UserInput, VarName.

In some contexts, the following elements are allowed anywhere: BeginPage, IndexTerm.

In some contexts, the following elements are excluded: IndexTerm.

See Also

FuncDef, FuncPrototype, FuncSynopsisInfo, Function, ParamDef, Parameter, ReturnValue, VarArgs, Void

Examples

<!DOCTYPE funcsynopsis PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <funcsynopsis> <funcprototype>   <funcdef>void <function>qsort</function></funcdef>     <paramdef>void *<parameter>dataptr</parameter>[]</paramdef>     <paramdef>int <parameter>left</parameter></paramdef>     <paramdef>int <parameter>right</parameter></paramdef>     <paramdef>int <parameter>(* comp)</parameter>       <funcparams>void *, void *</funcparams></paramdef> </funcprototype> </funcsynopsis>

void qsort(void *dataptr[], int left, int right, int (* comp) (void *, void *));

For additional examples, see also FuncSynopsis.


PrevHomeNext
FuncDefUpFuncPrototype

Back to: DocBook: The Definitive Guide


O'Reilly Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies

© 1999, O'Reilly & Associates, Inc.



DocBook. The Definitive Guide
DocBook 5: The Definitive Guide
ISBN: 0596805020
EAN: 2147483647
Year: 1999
Pages: 412
Authors: Walsh Norman, Richard L. Hamilton
BUY ON AMAZON

Similar book on Amazon
DocBook XSL: The Complete Guide (4th Edition)
DocBook XSL: The Complete Guide (4th Edition)
XSLT, 2nd Edition
XSLT, 2nd Edition
XSLT Cookbook: Solutions and Examples for XML and XSLT Developers, 2nd Edition
XSLT Cookbook: Solutions and Examples for XML and XSLT Developers, 2nd Edition
XML: Visual QuickStart Guide (2nd Edition)
XML: Visual QuickStart Guide (2nd Edition)

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net