19 control_word(f.control_word),
20#elif defined(USE_BIT_FIELDS)
23 s_ban_del(f.s_ban_del),
24 s_ban_sub(f.s_ban_sub),
25 s_ban_cop(f.s_ban_cop),
27 s_allow_del_at_zero_count(f.s_allow_del_at_zero_count),
34#elif defined(USE_BIT_FIELDS)
35 if (f.conparam.s_ban_cop == 2) {
37 if (f.s_ban_cop == 2) {
40 <<
"RegPassivePtr::RegPassivePtr(const RegPassivePtr& f):\n"
41 <<
"attempt to copy object whose s_ban_cop == 2.\n";
46#elif defined(USE_BIT_FIELDS)
52 <<
"RegPassivePtr::RegPassivePtr(const RegPassivePtr& f):\n"
53 <<
"attempt to copy referred object whose s_ban_cop == 1.\n"
64#elif defined(USE_BIT_FIELDS)
65 if (f.conparam.s_ban_cop == 2) {
67 if (f.s_ban_cop == 2) {
70 <<
"RegPassivePtr& RegPassivePtr::operator=(const RegPassivePtr& "
72 <<
"attempt to copy object whose s_ban_cop == 2.\n";
76#elif defined(USE_BIT_FIELDS)
82 <<
"RegPassivePtr& RegPassivePtr::operator=(const "
83 "RegPassivePtr& f):\n"
84 <<
"attempt to copy referred object whose s_ban_cop == 1.\n"
91#ifdef USE_DELETE_AT_ZERO_COUNT
96#elif defined(USE_BIT_FIELDS)
97 conparam.s_ban_cop = f.conparam.s_ban_cop;
98#ifdef USE_DELETE_AT_ZERO_COUNT
99 conparam.s_allow_del_at_zero_count = f.conparam.s_allow_del_at_zero_count;
101 conparam.s_ban_del = f.conparam.s_ban_del;
102 if (conparam.s_ban_sub == 1)
104 s_ban_cop = f.s_ban_cop;
105#ifdef USE_DELETE_AT_ZERO_COUNT
106 s_allow_del_at_zero_count = f.s_allow_del_at_zero_count;
108 s_ban_del = f.s_ban_del;
115 <<
"RegPassivePtr& RegPassivePtr::operator=(const RegPassivePtr& "
117 <<
"self-assignment, s_ban_sub == 1, but the object is addressed.\n"
118 <<
"This can lead to loss of pointers to copied object, not only "
127#elif defined(USE_BIT_FIELDS)
128 else if (conparam.s_ban_sub == 2 && cpp != NULL &&
135 <<
"RegPassivePtr& RegPassivePtr::operator=(const RegPassivePtr& "
137 <<
"s_ban_sub == 2, but the object is addressed.\n";
142#elif defined(USE_BIT_FIELDS)
143 conparam.s_ban_sub = f.conparam.s_ban_sub;
145 s_ban_sub = f.s_ban_sub;
150int RegPassivePtr::s_print_adr_cpp = 0;
153 if (l > 0) file << (*this);
158#ifdef USE_CHAR_GETSETTERS_PARAMETERS
165#elif defined USE_BIT_FIELDS
166 Ifile <<
"RegPassivePtr<X>: s_ban_del/sub/cop=" << f.conparam.s_ban_del <<
"/"
167 << f.conparam.s_ban_sub <<
"/" << f.conparam.s_ban_cop;
169#ifdef USE_CHAR_CONTROL_VARIABLES
170 Ifile <<
"RegPassivePtr<X>: s_ban_del/sub/cop=" << int(f.s_ban_del) <<
"/"
171 << int(f.s_ban_sub) <<
"/" << int(f.s_ban_cop);
173 Ifile <<
"RegPassivePtr<X>: s_ban_del/sub/cop=" << f.s_ban_del <<
"/"
174 << f.s_ban_sub <<
"/" << f.s_ban_cop;
182 if (RegPassivePtr::s_print_adr_cpp == 0) {
184 file <<
" cpp=NULL\n";
186 file <<
" cpp!=NULL\n";
189 file <<
" cpp=" << f.cpp <<
'\n';
197#ifdef USE_DELETE_AT_ZERO_COUNT
200 Ifile <<
"s_allow_del_at_zero_count="
201#ifdef USE_CHAR_GETSETTERS_PARAMETERS
206#elif defined(USE_BIT_FIELDS)
207 Ifile <<
"s_allow_del_at_zero_count=" << f.conparam.s_allow_del_at_zero_count
210#ifdef USE_CHAR_CONTROL_VARIABLES
211 Ifile <<
"s_allow_del_at_zero_count=" << int(f.s_allow_del_at_zero_count)
214 Ifile <<
"s_allow_del_at_zero_count=" << f.s_allow_del_at_zero_count <<
'\n';
229int RegPassivePtr::s_ban_del_ignore = 0;
241#elif defined(USE_BIT_FIELDS)
242 if (s_ban_del_ignore == 0 && conparam.s_ban_del == 1)
244 if (s_ban_del_ignore == 0 && s_ban_del == 1)
247 mcerr <<
"Error in RegPassivePtr::~RegPassivePtr() "
248 <<
"s_ban_del == 1, but there are pointers to this class.\n";
251 s_ban_del_ignore = 1;
#define USE_DELETE_AT_ZERO_COUNT
long get_number_of_booked(void)
void change_rpp(const RegPassivePtr *frpp)
void clear_pointers(void) const
virtual void print(std::ostream &file, int l=1) const
RegPassivePtr & operator=(const RegPassivePtr &f)
char get_s_allow_del_at_zero_count(void) const
void set_s_ban_cop(char fs_ban_cop)
void set_s_allow_del_at_zero_count(char fs_allow_del_at_zero_count)
char get_s_ban_sub(void) const
friend std::ostream & operator<<(std::ostream &file, const RegPassivePtr &f)
void set_s_ban_sub(char fs_ban_sub)
char get_s_ban_cop(void) const
void set_s_ban_del(char fs_ban_del)
char get_s_ban_del(void) const
long get_total_number_of_references(void) const