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

jengelh-datetimespielwiese
Last change on this file since fbc7cb was 210e07, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
ADD: testing headers with "make test.o" FIX: cleaning up headers in kernel: TODO: kutil.h?! FIX: febase.h -> old.febase.h (remove later on) ADD: dummy headers instead of some splited or moved: febase.h, modulop.h (for later fixing) FIX: renamed various obsolette files into "old.*"
  • 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.