source: git/kernel/old/old.CCRing.h @ c858487

fieker-DuValspielwiese
Last change on this file since c858487 was 1f93cd, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Moved old (obsolete) code into '/kernel/old/' + cleanup
  • Property mode set to 100644
File size: 635 bytes
Line 
1#ifndef CCRING_WRAP_HEADER
2#define CCRING_WRAP_HEADER
3#include <polys/monomials/ring.h>
4#include <kernel/grammar.h>
5#include <kernel/subexpr.h>
6#include <kernel/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.