source: git/kernel/CCRing.h @ 76e501

spielwiese
Last change on this file since 76e501 was 599326, checked in by Kai Krüger <krueger@…>, 14 years ago
Anne, Kai, Frank: - changes to #include "..." statements to allow cleaner build structure - affected directories: omalloc, kernel, Singular - not yet done: IntergerProgramming git-svn-id: file:///usr/local/Singular/svn/trunk@13032 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 626 bytes
Line 
1#ifndef CCRING_WRAP_HEADER
2#define CCRING_WRAP_HEADER
3#include <kernel/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.