Commit 8991d163 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

improved documentation

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1072
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 9136e56c
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: commandline.h,v 1.3 2002-11-19 22:09:37 forbrig Exp $
* $Id: commandline.h,v 1.4 2002-11-20 15:19:25 forbrig Exp $
*
* \date 12/01/2002
* \author Thomas Forbriger
......@@ -23,30 +23,40 @@
#ifndef TF_COMMANDLINE_H_
//! $Id: newclass,v 1.2 2000/10/13 09:16:32 forbrig Exp 3
#define TF_COMMANDLINE_H_ \
"$Id: commandline.h,v 1.3 2002-11-19 22:09:37 forbrig Exp $";
"$Id: commandline.h,v 1.4 2002-11-20 15:19:25 forbrig Exp $";
#include <string>
namespace tfxx {
/*! \defgroup commandline Commandline options and arguments.
/*! \defgroup group_commandline Commandline options and arguments.
* \brief Evaluate options and arguments given on the command line.
*
* The module is presented in namespace tfxx::cmdline.
* You will find an example in tests/commandlinetest.cc.
*
* \sa tfxx::cmdline::Commandline
* \sa tfxx::cmdline
* \sa example_commandlinetest
*/
/*! \namespace tfxx::cmdline
* \brief Namespace containing all components of module commandline.
* \ingroup group_commandline
* \sa example_commandlinetest
* \sa group_commandline
* \sa tfxx::cmdline::Commandline
*/
namespace cmdline {
/*! \brief option modes
* \sa Commandline
* \sa Declare
* \ingroup commandline
* \ingroup group_commandline
*
* The following enums are used to define whether an option has or has not
* an argument. It is used within Declare. It tells Commandline whether it
* has to look for arguments to the option.
*
* \sa tfxx::cmdline::Commandline
* \sa tfxx::cmdline::Declare
*/
enum Eopt_arg_mode
{
......@@ -60,8 +70,7 @@ namespace cmdline {
/*!
* \brief struct to define options
* \sa tfxx::cmdline::Commandline
* \ingroup commandline
* \ingroup group_commandline
*
* This struct is used to define a list of options. An example is:
*
......@@ -86,6 +95,7 @@ namespace cmdline {
* the option anme, the second the argument mode and the third the default
* argument.
*
* \sa tfxx::cmdline::Commandline
*/
struct Declare {
//! option name
......@@ -98,9 +108,7 @@ namespace cmdline {
/*! \class Commandline
* \brief Evaluates commandline by calling \c long_getopt.
*
* \sa Declare
* \ingroup commandline
* \ingroup group_commandline
*
* You may instantiate a Commandline object by passing the C-variables \c
* iargc and \c argv (which are passed to \c main) and a Declare-list to the
......@@ -148,6 +156,11 @@ namespace cmdline {
*
* Consult the documentation of tfxx::cmdline::Declare on the construction of
* the \c options array.
*
* \sa tfxx::cmdline::Declare
* \sa example_commandlinetest
* \sa group_commandline
* \sa tfxx::cmdline
*/
class Commandline {
public:
......@@ -206,7 +219,11 @@ class Commandline {
}
}
//! Structure to store result of command line scanning.
/*! \brief Structure to store result of command line scanning.
*
* This is privately contained (nested class) in
* tfxx::cmdline::Commandline.
*/
struct Result {
//! true if option was used on command line
bool opt_set;
......@@ -227,14 +244,16 @@ class Commandline {
};
/*! \example tests/commandlinetest.cc
* \ingroup commandline
* \ingroup group_commandline
*
* You will find and example for the module commandline in
* tests/commandlinetest.cc.
*
* \sa tfxx::cmdline::Commandline
* \sa tfxx::cmdline::Declare
* \sa tfxx::cmdline
* \sa commandline
*
* You will find and exmaple for the module commandline in
* tests/commandlinetest.cc.
* \sa group_commandline
* \sa example_commandlinetest
*/
}; // namespace cmdline
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: fortranio.h,v 1.10 2002-11-20 14:57:50 forbrig Exp $
* $Id: fortranio.h,v 1.11 2002-11-20 15:19:25 forbrig Exp $
* \author Thomas Forbriger
* \date 13/01/2002
*
......@@ -28,7 +28,7 @@
#define TF_FORTRANIO_H_VERSION \
"TF_ V1.0 "
#define TF_FORTRANIO_H_CVSID \
"$Id: fortranio.h,v 1.10 2002-11-20 14:57:50 forbrig Exp $"
"$Id: fortranio.h,v 1.11 2002-11-20 15:19:25 forbrig Exp $"
#include<tfxx/misc.h>
#include<fstream>
......@@ -55,8 +55,9 @@ namespace tfxx {
* \par Test of I/O-routines
* The I/O routines where testet on 20/11/2002. The test code may be found in
* tests/fortraniotest.cc, which is documented in \ref example_fortraniotest,
* and in tests/fortranF77.f, which is the Fortran 77 part of the test module.
* The Fortran part was compiled and run on two systems:
* and in \ref anchor_fortranio_f77code "tests/fortranF77.f", which is the
* Fortran 77 part of the test module. The Fortran part was compiled and run
* on two systems:
*
* -# \c AIX \c geo31 \c 3 \c 4 \c 002030455700 (Motorola CPU)
* -# \c Linux \c geo19 \c 2.4.4-64GB-SMP \c #1 \c SMP \c i686 \c unknown
......@@ -76,8 +77,8 @@ namespace tfxx {
* -# complex<double>
*
* \sa example_fortraniotest
* \sa tfxx::fortranio::FortranBinInput& operator<<(tfxx::fortranio::FortranBinInput&, T&)
* \sa tfxx::fortranio::FortranBinInput& * operator>>(tfxx::fortranio::FortranBinInput&, const T&)
* \sa tfxx::fortranio::FortranBinOutput& operator<<(tfxx::fortranio::FortranBinOutput&, T&)
* \sa tfxx::fortranio::FortranBinInput& operator>>(tfxx::fortranio::FortranBinInput&, const T&)
*/
/*! \brief contains all FORTRAN file data input output functions
......@@ -110,6 +111,9 @@ namespace fortranio {
* from <cstdlib>. Future versions should define exception classes.
*
* \sa example_fortraniotest
* \sa tfxx::fortranio::FortranBinInput
* \sa tfxx::fortranio::FortranBinInput& operator>>(tfxx::fortranio::FortranBinInput&, const T&)
* \
*/
class FortranBinInput {
public:
......@@ -165,6 +169,8 @@ class FortranBinInput {
* for convenient access.
*
* \sa example_fortraniotest
* \sa tfxx::fortranio::FortranBinInput
* \sa tfxx::fortranio::FortranBinOutput& operator<<(tfxx::fortranio::FortranBinOutput&, T&)
*/
class FortranBinOutput {
public:
......@@ -192,12 +198,15 @@ class FortranBinOutput {
};
/*! \example tests/fortranF77.f
* \sa tfxx::fortranio::FortranBinInput
* \sa group_fortranio
* \sa example_fortraniotest
* \anchor anchor_fortranio_f77code
*
* You will find and example for the module fortranio in
* tests/fortraniotest.cc and tests/fortranF77.f.
*
* \sa tfxx::fortranio::FortranBinInput
* \sa tfxx::fortranio::FortranBinOutput
* \sa group_fortranio
* \sa example_fortraniotest
*/
/*! \example tests/fortraniotest.cc
......@@ -206,6 +215,7 @@ class FortranBinOutput {
* tests/fortraniotest.cc and tests/fortranF77.f.
*
* \sa tfxx::fortranio::FortranBinInput
* \sa tfxx::fortranio::FortranBinOutput
* \sa example_fortraniotest
* \sa group_fortranio
*/
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: commandlinetest.cc,v 1.2 2002-11-15 17:37:39 forbrig Exp $
* $Id: commandlinetest.cc,v 1.3 2002-11-20 15:19:26 forbrig Exp $
* \author Thomas Forbriger
* \date 15/11/2002
*
......@@ -19,7 +19,7 @@
#define COMMANDLINETEST_VERSION \
"COMMANDLINETEST V1.0 test commandline class"
#define COMMANDLINETEST_CVSID \
"$Id: commandlinetest.cc,v 1.2 2002-11-15 17:37:39 forbrig Exp $"
"$Id: commandlinetest.cc,v 1.3 2002-11-20 15:19:26 forbrig Exp $"
#include <iostream>
#include <tfxx/commandline.h>
......@@ -28,6 +28,15 @@ using std::cout;
using std::cerr;
using std::endl;
/*! \defgroup example_commandlinetest TEST: Commandline evaluation.
*/
/*! \brief Program to test class tfxx::comdline::Commandline.
* \ingroup example_commandlinetest
* \sa tfxx::cmdline::Commandline
* \sa tfxx::cmdline
* \sa group_commandline
*/
int main(int iargc, char* argv[])
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment