60 {
61
62#ifdef USE_BIT_OPERA
63 if (f.get_s_ban_cop() == 2) {
64#elif defined(USE_BIT_FIELDS)
65 if (f.conparam.s_ban_cop == 2) {
66#else
67 if (f.s_ban_cop == 2) {
68#endif
70 << "RegPassivePtr& RegPassivePtr::operator=(const RegPassivePtr& "
71 "f):\n"
72 << "attempt to copy object whose s_ban_cop == 2.\n";
74#ifdef USE_BIT_OPERA
75 } else if (f.get_s_ban_cop() == 1 && f.cpp->get_number_of_booked() > 0) {
76#elif defined(USE_BIT_FIELDS)
77 } else if (f.conparam.s_ban_cop == 1 && f.cpp->get_number_of_booked() > 0) {
78#else
79 } else if (f.s_ban_cop == 1 && f.cpp->get_number_of_booked() > 0) {
80#endif
82 << "RegPassivePtr& RegPassivePtr::operator=(const "
83 "RegPassivePtr& f):\n"
84 << "attempt to copy referred object whose s_ban_cop == 1.\n"
85 << "f.cpp->get_number_of_booked()=" << f.cpp->get_number_of_booked()
86 << '\n';
88 }
89#ifdef USE_BIT_OPERA
91#ifdef USE_DELETE_AT_ZERO_COUNT
93#endif
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;
100#endif
101 conparam.s_ban_del = f.conparam.s_ban_del;
102 if (conparam.s_ban_sub == 1)
103#else
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;
107#endif
108 s_ban_del = f.s_ban_del;
109 if (s_ban_sub == 1)
110#endif
111 {
112 if (this == &f &&
115 << "RegPassivePtr& RegPassivePtr::operator=(const RegPassivePtr& "
116 "f):\n"
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 "
119 "to this one.\n";
121 }
123 }
124#ifdef USE_BIT_OPERA
127#elif defined(USE_BIT_FIELDS)
128 else if (conparam.s_ban_sub == 2 && cpp != NULL &&
130#else
132#endif
133 {
135 << "RegPassivePtr& RegPassivePtr::operator=(const RegPassivePtr& "
136 "f):\n"
137 << "s_ban_sub == 2, but the object is addressed.\n";
139 }
140#ifdef USE_BIT_OPERA
142#elif defined(USE_BIT_FIELDS)
143 conparam.s_ban_sub = f.conparam.s_ban_sub;
144#else
145 s_ban_sub = f.s_ban_sub;
146#endif
147 return *this;
148}
void clear_pointers(void) const
void set_s_allow_del_at_zero_count(char fs_allow_del_at_zero_count)
char get_s_ban_sub(void) const