fieker-DuValspielwiese
Last change
on this file since 1f6c7a was
2b78bd,
checked in by Frank Seelisch <seelisch@…>, 15 years ago
|
test code for Minors and C++Wrappers (with defines HAVE_MINOR and HAVE_WRAPPERS)
git-svn-id: file:///usr/local/Singular/svn/trunk@12151 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
727 bytes
|
Line | |
---|
1 | #ifndef REFERENCE_COUNTER_H |
---|
2 | #define REFERENCE_COUNTER_H |
---|
3 | |
---|
4 | #ifdef HAVE_WRAPPERS |
---|
5 | |
---|
6 | /// Set type for storing reference counter |
---|
7 | typedef unsigned long refcount_type; |
---|
8 | |
---|
9 | class ReferenceCounter { |
---|
10 | private: |
---|
11 | /// Store reference counter |
---|
12 | refcount_type m_counter; |
---|
13 | public: |
---|
14 | ReferenceCounter (); |
---|
15 | |
---|
16 | /// Deep copy |
---|
17 | ReferenceCounter (const ReferenceCounter& rc); |
---|
18 | |
---|
19 | /// Destructor |
---|
20 | ~ReferenceCounter (); |
---|
21 | |
---|
22 | /// Get reference counter |
---|
23 | refcount_type getCounter () const; |
---|
24 | |
---|
25 | /// Check, whether reference is used multiple times |
---|
26 | bool isShared () const; |
---|
27 | |
---|
28 | /// Increase reference counter |
---|
29 | refcount_type increment (); |
---|
30 | |
---|
31 | /// Decrease reference counter |
---|
32 | refcount_type decrement (); |
---|
33 | }; |
---|
34 | |
---|
35 | #endif // HAVE_WRAPPERS |
---|
36 | |
---|
37 | #endif |
---|
38 | /* REFERENCE_COUNTER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.