SheafSystem  0.0.0.0
rc_any.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 #ifndef RC_ANY_H
22 #define RC_ANY_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ANY_H
29 #include "SheafSystem/any.h"
30 #endif
31 
32 #ifndef STD_IOSTREAM_H
33 #include "SheafSystem/std_iostream.h"
34 #endif
35 
36 namespace sheaf
37 {
38 
42 class SHEAF_DLL_SPEC rc_any : public any
43 {
44  // ===========================================================
46  // ===========================================================
48 
49 public:
50 
54  rc_any();
55 
59  rc_any(const rc_any& xother);
60 
64  rc_any& operator=(const rc_any& xother);
65 
69  ~rc_any();
70 
74  void add_reference();
75 
80  void remove_reference();
81 
85  bool is_shared() const;
86 
90  size_type ref_ct() const;
91 
92 protected:
93 
98 
99 private:
100 
102 };
103 
104 
105 // ===========================================================
106 // NON-MEMBER FUNCTIONS
107 // ===========================================================
108 
112 SHEAF_DLL_SPEC
113 std::ostream&
114 operator << (std::ostream &os, const rc_any& rc);
115 
116 } // namespace sheaf
117 
118 #endif // ifndef RC_ANY_H
119 
120 
121 
122 
123 
124 
Abstract base class with useful features for all objects.
Definition: any.h:39
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
Base class for reference counting.
Definition: rc_any.h:42
size_type _ref_ct
Reference count.
Definition: rc_any.h:97
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const dof_descriptor_array &p)
Insert dof_descriptor_array& p into ostream& os.
Namespace for the sheaves component of the sheaf system.