Changeset a388ae in git for Singular/Wrappers.h


Ignore:
Timestamp:
Oct 21, 2009, 5:36:00 PM (15 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9b4a332909ecddda93d19e235977388831620db1
Parents:
bb503c7363e3c90a3b0c5ae93374d5b7b20cc34a
Message:
added doxygen-like comments


git-svn-id: file:///usr/local/Singular/svn/trunk@12198 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/Wrappers.h

    rbb503c7 ra388ae  
    88#include "PrettyPrinter.h"
    99
     10/*! \mainpage C++ wrappers for SINGULAR and related systems
     11 *
     12 *  \section design Design Overview
     13 *  The following picture shows a UML-like design of the classes implemented so far,
     14 *  and their relationship.
     15 *  \image html "file:///C:/Work/C++Code/inside SINGULAR/C++Wrappers/Overview1.jpg"
     16 *
     17 *  \section howto How to run this code inside SINGULAR
     18 *  The following steps need to be done to run the C++ wrapper code inside SINGULAR:<br><br>
     19 *  Re-build and run SINGULAR:<br>
     20 *  - checkout the latest code and compile SINGULAR,<br>
     21 *  - go to <c>/SINGULAR</c> and perform <c>make clean</c>,<br>
     22 *  - go to <c>/kernel</c> and perform <c>make clean</c>,<br>
     23 *  - open <c>/SINGULAR/mod2.h</c> and include the line <c>#define HAVE_WRAPPERS 1</c>,<br>
     24 *  - open <c>/kernel/mod2.h</c> and include the line <c>#define HAVE_WRAPPERS 1</c>,<br>
     25 *  - go to <c>/SINGULAR</c> and perform <c>make</c>,<br>
     26 *  - go to <c>/kernel</c> and perform <c>make</c> (Now you have a runnable SINGULAR version
     27 *    including the C++ wrapper code.),<br>
     28 *  - go to <c>/SINGULAR</c> and perform <c>./Singular</c> to run the newly built local
     29 *    executable<br>
     30 *
     31 *  Call the new code:<br>
     32 *  - you may first declare a ring, e.g. by typing <c>ring r;</c>,<br>
     33 *  - type <c>system("c++wrappers", 0);</c> to perform <c>testWrappers</c> (see file Wrappers.h) without
     34 *    detailed printout to the console,<br>
     35 *  - type <c>system("c++wrappers", 1);</c> to perform <c>testWrappers</c> (see file Wrappers.h) with
     36 *    detailed printout to the console,<br>
     37 *  - declare a ring and two polynomials f and g; then type <c>system("c++wrappers", f, g);</c>
     38 *    to perform <c>wrapSINGULARPolys</c> (see file Wrappers.h).
     39 */
     40
     41/*! type definition for the type of the instance counter inside the class ReferenceCounter */
     42typedef unsigned long ReferenceCounterType;
     43
     44/*! type definition for SINGULAR-internal polynomials */
     45typedef poly SingularPoly;
     46
     47/*! type definition for SINGULAR-internal rings */
     48typedef ring SingularRing;
     49
     50/*!
     51 *  A method for performing a series of tests with the wrapper code.<br>
     52 *  More concretely, the following tests will be performed:<br>
     53 *  - Test0: Creation of RingWrapper from current SINGULAR ring, if any,<br>
     54 *  - Test1: Creation and destruction of instances of RingWrapper,<br>
     55 *  - Test2: Creation, copying, assignment, and destruction of instances of PolyWrapper,<br>
     56 *  - Test3: Addition of compatible instances of PolyWrapper,<br>
     57 *  - Test4: Addition of incompatible instances of PolyWrapper.<br>
     58 *
     59 *  After compiling SINGULAR and including the line<br>
     60 *  <c>#define HAVE_WRAPPERS 1</c><br>
     61 *  in <c>/SINGULAR/mod2.h</c> and in <c>/kernel/mod2.h</c>, the user may call this
     62 *  method by typing <c>system("c++wrappers", 0)</c> (without detailed console printout),
     63 *  or <c>system("c++wrappers", 1)</c> (with detailed console printout).
     64 *  @param detailedOutput if true this enforces a very detailed console output including internal method calls etc.
     65 */
    1066void testWrappers (bool detailedOutput);
    1167
    12 typedef poly SingularPoly;
    13 typedef ring SingularRing;
     68/*!
     69 *  A method for wrapping SINGULAR-internal polynomials as instances of PolyWrapper
     70 *  and afterwards computing their sum as an instance of PolyWrapper.<br>
     71 *  After compiling SINGULAR and including the line<br>
     72 *  <c>#define HAVE_WRAPPERS 1</c><br>
     73 *  in <c>/SINGULAR/mod2.h</c> and in <c>/kernel/mod2.h</c>, the user may call this
     74 *  method by first declaring two polys f and g, and typing
     75 *  <c>system("c++wrappers", f, g)</c>.
     76 *  @param sp1 a SINGULAR-internal poly
     77 *  @param sp2 a SINGULAR-internal poly
     78 */
     79void wrapSINGULARPolys (const SingularPoly& sp1, const SingularPoly& sp2);
    1480
    15 extern PrettyPrinter prpr;   // for pretty printing
     81/*! PrettyPrinter used throughout all wrapper code
     82    for pretty-printing detailed output to the console
     83    if requested */
     84extern PrettyPrinter prpr;
    1685
    17 // some enums used for test prior
    18 // to static casts; see code
    19 #define UNSPECIFIED_POLY_TYPE 0
    20 #define CANONICAL_POLY_TYPE 1
    21 
    22 #endif // HAVE_WRAPPERS
     86#endif
     87/* HAVE_WRAPPERS */
    2388
    2489#endif
Note: See TracChangeset for help on using the changeset viewer.