source: git/Singular/RingWrapper.h @ a388ae

spielwiese
Last change on this file since a388ae was a388ae, checked in by Frank Seelisch <seelisch@…>, 14 years ago
added doxygen-like comments git-svn-id: file:///usr/local/Singular/svn/trunk@12198 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.1 KB
Line 
1#ifndef RING_WRAPPER_H
2#define RING_WRAPPER_H
3
4#ifdef HAVE_WRAPPERS
5
6#include "ring.h"
7#include "Wrappers.h"
8
9/*! \class RingWrapper
10 *  \brief Class RingWrapper provides a uniform interface to different
11 *         representations of rings.
12 *
13 *  Instances of RingWrapper uniformly represent different kinds of
14 *  rings that play a role in the computer algebra system SINGULAR
15 *  and related suites such as PolyBoRi. Especially SINGULAR-internal
16 *  rings can be wrapped by instances of RingWrapper.<br>
17 *  This is just a first implementation, so far for wrapping SINGULAR-internal
18 *  rings only.<br>
19 *  An important feature of RingWrapper is the check whether two given rings
20 *  (wrapped as instances of RingWrapper) are compatible with respect to
21 *  basic arithmetics; such as PolyWrapper::operator+ (const PolyWrapper& p) const.
22 *  \author Frank Seelisch, http://www.mathematik.uni-kl.de/~seelisch
23 */
24class RingWrapper
25{
26private:
27  /*! a member for storing a SINGULAR-internal ring;
28      note that this is not just a reference to but an instance
29      of a SINGULAR-internal ring */
30  SingularRing m_singularRing;
31public:
32  /*!
33   *  A constructor for RingWrapper.<br>
34   *  This constructor builds a SINGULAR-internal ring with a given
35   *  name, characteristic and list of variables. The monomial order
36   *  must also be provided and must be one of {dp, lp, Dp, ds, ls, Ds}.
37   *  @param ringName the name of the wrapped SINGULAR-internal ring
38   *  @param characteristic the characteristic of the wrapped SINGULAR-internal ring
39   *  @param varNumber the number of variables in the wrapped SINGULAR-internal ring
40   *  @param varNames the array of names of variables in the wrapped SINGULAR-internal ring
41   *  @param ringOrder one of {dp, lp, Dp, ds, ls, Ds}
42   *  @see RingWrapper::RingWrapper ()
43   */
44  RingWrapper (const char* ringName, const int characteristic,
45               const int varNumber, const char** varNames, const char* ringOrder);
46               
47  /*!
48   *  A default constructor for RingWrapper.<br>
49   *  This constructor wraps the current SINGULAR-internal ring which is
50   *  assumed to use one of the monomial orderings of {dp, lp, Dp, ds, ls, Ds}.
51   *  @see RingWrapper::RingWrapper (const char* ringName, const int characteristic,
52                                     const int varNumber, const char** varNames, const char* ringOrder)
53   */
54  RingWrapper ();
55 
56  /*!
57   *  A destructor for RingWrapper.<br>
58   *  Since the private member is an instance of a SINGULAR-internal ring and not
59   *  a reference, the destructor for this SINGULAR-internal ring will be called.
60   *  @see RingWrapper::RingWrapper ()
61   *  @see RingWrapper::RingWrapper (const char* ringName, const int characteristic,
62                                     const int varNumber, const char** varNames, const char* ringOrder)
63   */
64  ~RingWrapper ();
65
66  /*!
67   *  A method for printing a string representation of the given instance.<br>
68   *  This method does not use std::cout but only SINGULAR-internal print routines.
69   *  @see RingWrapper::printLn () const
70   *  @see RingWrapper::toString () const
71   */
72  void print () const;
73 
74  /*!
75   *  A method for printing a string representation of the given instance
76   *  followed by a linefeed.<br>
77   *  This method does not use std::cout but only SINGULAR-internal print routines.
78   *  @see RingWrapper::print () const
79   *  @see RingWrapper::toString () const
80   */
81  void printLn () const;
82 
83  /*!
84   *  A method for obtaining a string representation of the given instance.
85   *  @see RingWrapper::print () const
86   *  @see RingWrapper::printLn () const
87   */
88  char* toString () const;
89
90  /*!
91   *  A method for checking whether two wrapped rings are compatible with
92   *  respect to basic arithmetics such as PolyWrapper::operator+ (const PolyWrapper& p)
93   *  @param r another RingWrapper
94   *  @return true if the tow wrpaped rings are compatible
95   */
96  bool isCompatible (const RingWrapper& r) const;
97 
98  /*!
99   *  A method for retrieving the wrapped SINGULAR-internal ring.
100   *  @return the wrapped SINGULAR-internal ring
101   */
102  const SingularRing& getSingularRing () const;
103};
104
105#endif
106/* HAVE_WRAPPERS */
107
108#endif
109/* RING_WRAPPER_H */
Note: See TracBrowser for help on using the repository browser.