//# <GlobalFunctionFileName.h>: these function perform....
//# Copyright (C) 2003
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//#        Internet email: casa-feedback@nrao.edu.
//#        Postal address: AIPS++ Project Office
//#                        National Radio Astronomy Observatory
//#                        520 Edgemont Road
//#                        Charlottesville, VA 22903-2475 USA
//#
//#! ========================================================================
//#!                Attention!  Programmers read this!
//#!
//#! This file is a template to guide you in creating a header file
//#! for a group of related global functions.  By following this template,
//#! you will create a permanent reference document for your them, suitable
//#! for the novice client programmer, the seasoned veteran, and anyone in 
//#! between.  It is essential that you write the documentation portions 
//#! of this file  with as much care as you do the source code.
//#!
//#! This file has some special lexical features which need explanation:
//#!
//#!    -  "replacement" tokens
//#!    -  Comment conventions (in addition to the normal C++ "//")
//#!    -  Markup tags, for the documentation extractor
//#!
//#!                         Replacement Tokens
//#!                         ------------------
//#!
//#! These are character strings enclosed in angle brackets, on a commented
//#! line.  One is found on the first line of this file:
//#!
//#!   <GlobalFunctionFileName.h>
//#!
//#! You should remove the angle brackets, and replace the characters within
//#! the brackets with name you have chosen.  Mimic the capitalization
//#! and punctuation of the original.  For example, you would change
//#!
//#!   <GlobalFunctionFileName.h>  to  ArrayIO.h
//#!
//#! Another replacement token will be found in the "include guard" just
//#! a few lines below.
//#!
//#! #define <AIPS_GLOBAL_FUNCTION_FILENAME_H> to #define AIPS_ARRAY_IO_H
//#!
//#!
//#!              Comment conventions used in this file.
//#!              --------------------------------------
//#!
//#! 1. Lines beginning with "//#!" are instructions to you, the reader of
//#!    template-global-function-h, which explain how to adapt this file
//#!    to create your own file.  These lines should *not* appear in the
//#!    the final version of your file.
//#! 2. Lines beginning with the shorter sequence "//#" stay in the file
//#!    permanently, but they are ignored by the document extractor and,
//#!    of course, by the compiler.  The license agreement (above) is
//#!    a good example.
//#! 3. Lines beginning with the traditional C++ comment token, "//",
//#!    may include tags to be used by the documentation extractor.
//#!
//#!
//#!              Markup tags for the documentation extractor
//#!              -------------------------------------------
//#!
//#! These tags are roughly similar to those found in the well-known
//#! HTML (hyper-text markup language) used on the world-wide-web.
//#! They identify sections of the documentation so that the extractor
//#! (a standard aips++ utility) can manipulate them, and create
//#! programmer documentation.
//#!   (See http://www.cv.nrao.edu/aips++/docs/html/cxx2html.html)
//#! These tags also serve as organizational clues to anyone who
//#! reads the text directly, serving as section titles.
//#!
//#! Tags are set up like this:
//#!
//#!       <tag>  Contents (or body) of tagged section
//#!       </tag>
//#!
//#! Please note that, with few exceptions, all tags are accompanied by
//#! explicit "end tags".  So <summary> must be paired with </summary> 
//#! and <src> with </src>.
//#!
//#! Exceptions to this rule:
//#!
//#!  <li>     which identifies "list items".  They are only found in the 
//#!           body of <ul> or <ol> tags, and their implicit end tags are 
//#!           deduced from the surrounding context.
//#!
//#!  <use...> a tag which has no body, only attributes.
//#!
//#!                          ------------
//#!
//#! Here are some of the tags we use:
//#!
//#!   <summary>:           A one line description of these functions.
//#!
//#!   <prerequisite>:      Classes and concepts the reader should
//#!                        understand before tackling these functions.
//#!
//#!   <etymology>:         Explains why "GlobalFunctionName" was selected.
//#!
//#!   <synopsis>:          A medium to long description of these functions.
//#!
//#!   <motivation>:        The circumstances which led to the creation of
//#!                        these functions.
//#!
//#!   <todo>:              A list of bugs, missing features, planned
//#!                        extensions.
//#!
//#!   <reviewed>:          By whom, when, with what test and demo
//#!                        programs.  The body of this tag will contain
//#!                        any comments the reviewer wishes to make.
//#!
//#!   <use...>:            Describes the intended use of these functions.
//#!                        Currently, there is only one attribute, 
//#!                        'visibility' which has the value 'local'
//#!                        or 'export'.  Global functions will most often
//#!                        have an export visibility.
//#!
//#!   <ul>:                Introduces the beginning of an unnumbered list.
//#!
//#!   <ol>:                Introduces an ordered (numbered) list.
//#!
//#!   <li>:                Indicates one item in a list.
//#!
//#!   <srcblock>:          A section of text -- sample code, for example --
//#!                        that will be presented in a distinct
//#!                        font and without reformatting. This tag should
//#!                        be used for multi-line source code text.
//#!                        (This is for illustrative code only, hidden
//#!                        from the compiler in commet lines.  It is not
//#!                        for real, live C++ code.)
//#!
//#!   <src>:               Just like <srcblock>, but for code fragments
//#!                        which are quite short, quoted "inline" in the
//#!                        midst of regular explanatory comments.
//#!
//#!   <note role=tip>:     Helpful advice for the programmer who will use 
//#!                        these functions.
//#!
//#!   <note role=caution>: Explains why certain uses of these functions 
//#!                        may be a bit tricky, and needs some care.
//#!
//#!   <note role=warning>: Warns the programmer of dangerous coding practices.
//#!
//#!   <templating arg=T>:  A templated function often requires certain
//#!                        member functions in the template arguments.
//#!                        (see example below for a full explanation).
//#!
//#!   <thrown>:            Provide a list of exceptions thrown before
//#!                        the declaration of the function that throws them.
//#!
//#!   <group>,
//#!   <group name=xxx>:    Use this tag to apply a single comment to a
//#!                        group of related functions.  If you use the
//#!                        'name' attribute, then the document extractor
//#!                        will generate an anchor for this group --
//#!                        meaning that the group can be reached via a
//#!                        hyper-text link.  (This link will appear only in
//#!                        the present file, and will appear in addition to
//#!                        the usual links generated for each member function.
//#!                        To generate a link in some *other* file, use
//#!                        the <linkto> tag.
//#!
//#!   <linkto ...>:        This creates a link to an anchor in another
//#!                        document.
//#!                        Please consult
//#!                   http://www.cv.nrao.edu/aips++/docs/html/cxx2html.html
//#!                        and read the section titled "LINKTO"
//#!
//#!   <linkfrom...>:       This tag instructs the document extractor to
//#!                        create an anchor in *another* document -- that is,
//#!                        a hyper-text link whose destination is here.
//#!                        There are several attributes to this tag, and
//#!                        there is also the associated <here> tag.
//#!                        Please consult
//#!                   http://www.cv.nrao.edu/aips++/docs/html/cxx2html.html
//#!                        and read the section titled "LINKFROM"
//#!
//#!   <here>:              Provides the text of the HTML anchor that will
//#!                        be placed in the *other* file named in the linkfrom
//#!                        tag.  See example below.
//#!
//#!  // <linkto anchor=binary_io classes="Array Vector Matrix Cube">
//#!  //    Array <here> binary input/output </here> operators.
//#!  // </linkto>




//#!   Some tags (i.e., "reviewed" and "todo") have attributes -- key/value
//#!   pairs like this:
//#!
//#!      <reviewed reviewer="Paul Shannon" date="1994/11/10">
//#!       ...comments...
//#!      </reviewed>
//#!
//#!      <todo asof="1994/11/02">
//#!         <li> a needed feature...
//#!      </todo>
//#!
//#!   The keywords (reviewer, date, asof) are fixed.
//#!   Their values ("Paul Shannon", "1994/11/10", "1994/11/02") should be 
//#!   enclosed in double quotes.  Dates must be in the standard format:
//#!   yyyy/mm/dd.
//#!
//#! ==========================================================================
//#! The following RCS (Revision Control System) identifier serves a dual 
//#! purpose:  it records version control information for the template 
//#! template-module-h,  and (after you delete the appropriate characters) 
//#! it becomes the RCS identifier for *your* module header file.  The 
//#! characters to delete are all those in the RCS Id, below, from the first
//#! colon up to the trailing dollar sign.
//#! (RCS expands the 'Id' token, surrounded by dollar signs, into the file
//#! name, with version number and date of last change.
//#! ==========================================================================
//#
//# $Id$

//#! Create an include 'guard', containing your file name in the all
//#! upper case format implied below.  This prevents multiple inclusion
//#! of this header file during pre-processing.
//#!
//#! Note that the leading "AIPS_" identifies the package to which your class
//#! belongs.  Other packages include dish, vlbi, nfra, synthesis, atnf...
//#! If you are contributing a new class to one of these packages, be
//#! sure to replace "AIPS_" with (for instance) "DISH_" or "ATNF_".

#if !defined(<AIPS_GLOBAL_FUNCTION_FILENAME_H>)
#define <AIPS_GLOBAL_FUNCTION_FILENAME_H>

//#! Includes go here

namespace casa { //# NAMESPACE CASA - BEGIN

//# Forward Declarations

// <summary>
//#! A one line summary of this group of functions.   This summary
//#! (shortened a bit if necessary so that it fits along with
//#! the "GlobalFunctionFileName.h" in 75 characters) should also appear
//#! as the first line of this file.
// </summary>

// <use visibility=local>   or   <use visibility=export>
//#! If the global functions are intended for use by application programmers,
//#! or people writing other libraries, then specify that they
//#! has an "export" visibility:  they will be seen outside of its module.
//#! On the other hand, if they have a "local" visibility, then it is known
//#! and used only  within its module.

// <reviewed reviewer="" date="" tests="" demos="">
//#! for example:
//#!     <reviewed reviewer="Paul Shannon" date="1994/10/10" tests="tMyGFunc, t1MyGFunc" demos="dMyGFunc, d1MyGFunc">
//#!     The functions may need rethinking when the STL is
//#!     commonly available.
//#!     </reviewed>
//#
//#! (In time, the documentation extractor will be able handle reviewed
//#! attributes spread over more than one line.)
//#!
//#! see "Coding Standards and Guidelines"  (AIPS++ note 167) and
//#! "AIPS++ Code Review Process" (note 170) for a full explanation
//#! It is up to the author (the programmer) to fill in these fields:
//#!     tests, demos
//#! The reviewer fills in
//#!     reviewer, date
//#!
// </reviewed>

// <prerequisite>
//#! Classes or concepts you should understand before using this class.
//   <li> SomeClass
//   <li> SomeOtherClass
//   <li> some concept
// </prerequisite>
//
// <etymology>
//#! Except when it is obvious (e.g., "Array") explain how the name
//#! expresses the role of this function.  Example: IPosition is short for
//#! "Integral Position" - a specialized integer vector for specifying
//#! array dimensions and indices.
// </etymology>
//
// <synopsis>
//#! What do these functions do?  How?  For whom?  This should include code
//#! fragments as appropriate to support text.  Code fragments shall be
//#! delimited by <srcblock> </srcblock> tags.  The synopsis section will
//#! usually be dozens of lines long.
// </synopsis>
//
// <example>
//#! One or two concise (~10-20 lines) examples, with a modest amount of
//#! text to support code fragments.  Use <srcblock> and </srcblock> to
//#! delimit example code.
// </example>
//
// <motivation>
//#! Insight into global functions may be provided by a description of
//#! the circumstances that led to their conception and design.  Describe
//#! them here.  Explain, if relevant, why these functions are global
//#! rather than members of a class.
// </motivation>
//
// <templating arg=T>
//#! A list of member functions that must be provided by classes that
//#! appear as actual template arguments.  For example:  imagine that you
//#! are writing a templated sort function, which does a quicksort on a
//#! list of arbitrary objects.  Anybody who uses your templated function
//#! must make sure that the actual argument class (say, Int or
//#! String or Matrix) has comparison operators defined.  This tag must be
//#! repeated for each template formal argument in the template function 
//#! definition -- that's why this tag has the "arg" attribute.
//    <li>
//    <li>
// </templating>
//
// <thrown>
//#! A list of exceptions thrown if errors are discovered in the function.
//#! This tag will appear in the body of the header file, preceeding the
//#! declaration of each function which throws an exception.
//    <li>
//    <li>
// </thrown>
//
// <todo asof="yyyy/mm/dd">
//#! A List of bugs, limitations, extensions or planned refinements.
//#! The programmer should fill in a date in the "asof" field, which
//#! will usually be the date at which the class is submitted for review.
//#! If, during the review, new "todo" items come up, then the "asof"
//#! date should be changed to the end of the review period.
//   <li> add this feature
//   <li> fix this bug
//   <li> start discussion of this possible extension
// </todo>

//#! All of the text above is basically introduction and background
//#! to the actual declaration of the global functions.  But
//#! even in this declaration, which follows below, there is often the 
//#! need for more markup:  some functions are closely related, and you 
//#! should use the 'group' tag in order to present comments that apply 
//#! equally to all of the related functions.  In addition, you can easily 
//#! create  hypertext links in *other* documenation that point here: use
//#! the 'linkfrom' and 'here' tags to accomplish this.

//  <linkfrom anchor=xxx classes="Class1 Class2">
//      Related <here> foobar functions </here> for Class1 and Class2
//  </linkfrom>

//#!  ...some comments summarizing the shared features of this group...
// <group name=unique-string-within-this-file>
//#! void someFunction (someType &st);
//#! void someRelatedFunction (someType &st);
// </group>

//#! the <linkfrom> tag is strictly optional; use it only if you want
//#! to create links *to* this file from other files.

//  ...some comments summarizing the shared features of this group...
// <group name=another-unique-string-within-this-file>
//#! void someOtherFunc (someType &st);
//#! void someOtherRelatedFunc (someType &st);
//  </group>

//#! Here is an example from ArrayIO.h, in which two global
//#! functions are grouped together, and introduced by two lines of
//#! comment.  "aipsio" is the <unique-string-within-this-file>.
//#! two classes (Array and AipsIO) -- which appear as arguments to
//#! the two functions -- are named in the argument list.

//#!  // <linkfrom anchor=binary_io classes="Array Vector Matrix Cube">
//#!  //    Array <here> binary input/output </here> operators.
//#!  // </linkfrom>
//#!
//#!  // Read and write a binary representation of an Array to a file.
//#!  // Very useful for saving arrays and restoring them later.
//#!  // <group name=binary_io>
//#!  template<class T> AipsIO &operator<< (AipsIO &, const Array<T> &);
//#!  template<class T> AipsIO &operator>> (AipsIO &, Array<T> &);
//#!  // </group>
//#!
//#! This complex bit of markup has the following results when
//#! the extractor is run on all of the related header files:
//#!
//#!   - An HTML anchor "binary_io" is created at the top of the HTML
//#!     file created from this header file, which links to the two
//#!     lines of text declaring these functions, and their introductory
//#!     comment.
//#!   - In the HTML files created from Array.h, Vector.h, Matrix.h, and
//#!     Cube.h, a section is created that looks like this:
//#!
//#!        See Also:
//#!            Array binary input/output operators.
//#!                  -------------------
//#!
//#!'binary input/output operators' (underlined just above) becomes an 
//#! HTML anchor in those files because those words are enclosed 
//#! in <here> </here> tags.
//#! Note that "<group name=binary_io>" creates the destination anchor.
//#! If it is more appropriate to your needs, you can also create the
//#! destination anchor with the standard HTML markup: <a name=binary_io>;
//#! You would do this if you want to direct the reader of another
//#! file to information in this file, but that information is not
//#! part of a group, but just some general information that may be
//#! of interest.  For example:
//#!  // <a name=bin_io_efficiency>
//#!  // All of the operations described here have acceptable efficiency
//#!  // except in these cases...
//#!  // <ol>
//#!  //    <li> when foo is bar
//#!  //    <li> when bar is foo
//#!  // </ol>
//#!  // <linkfrom anchor=bin_io_efficiency classes="Array Vector Matrix Cube">
//#!  //    Array <here> Efficiency of binary io</here> operators.
//#!  // </linkfrom>
//#!

} //# NAMESPACE CASA - END

#endif
