source: git/kernel/CCRing.h @ bc669c

fieker-DuValspielwiese
Last change on this file since bc669c was 6f730e7, checked in by Michael Brickenstein <bricken@…>, 19 years ago
*bricken: from Python binding generalized git-svn-id: file:///usr/local/Singular/svn/trunk@8785 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 597 bytes
Line 
1#ifndef CCRING_WRAP_HEADER
2#define CCRING_WRAP_HEADER
3#include "ring.h"
4#include "grammar.h"
5#include "subexpr.h"
6#include "ipid.h"
7class Ring{
8  public:
9    ring pimpl;
10    Ring(ring r=currRing): pimpl(r){
11      if (r!=NULL)
12        ++(r->ref);
13    }
14    Ring(const Ring& r2):pimpl(r2.pimpl){
15      pimpl->ref++;
16    }
17    ~Ring(){
18      if (pimpl!=NULL)
19        --(pimpl->ref);
20    }
21    Ring & operator=(const Ring& r2){
22      r2.pimpl->ref++;
23      pimpl->ref--;
24      pimpl=r2.pimpl;
25    }
26   Ring & operator=(ring r2){
27      r2->ref++;
28      pimpl->ref--;
29      pimpl=r2;
30    }
31
32   };
33#endif
Note: See TracBrowser for help on using the repository browser.