#include <iostream>
#include <cstring>
#include <limits.h>
#include <typeinfo>
#include "wcpplib/stream/prstream.h"
#include "wcpplib/util/FunNameStack.h"
#include "wcpplib/util/emul_new_stand.h"
Go to the source code of this file.
|
std::ostream & | operator<< (std::ostream &file, const AbsCont &f) |
|
template<class X , class C > |
std::ostream & | operator<< (std::ostream &file, const ActivePtr< X, C > &f) |
|
template<class X , class C > |
std::istream & | operator>> (std::istream &file, ActivePtr< X, C > &f) |
|
template<class X , class C > |
void | exchange (ActivePtr< X, C > &f1, ActivePtr< X, C > &f2) |
|
template<class X > |
std::ostream & | operator<< (std::ostream &file, const PassivePtr< X > &f) |
|
template<class X > |
int | operator== (const PassivePtr< X > &f1, const PassivePtr< X > &f2) |
|
template<class X > |
bool | operator< (PassivePtr< X > f1, PassivePtr< X > f2) |
|
template<class X > |
std::ostream & | operator<< (std::ostream &file, const ActivePtrReg< X > &f) |
|
std::ostream & | operator<< (std::ostream &file, const DoubleReg &f) |
|
◆ AbsCont_copy
#define AbsCont_copy |
( |
|
type | ) |
virtual type* copy(void) const { return new type(*this); } |
◆ AnyType_copy
#define AnyType_copy |
( |
|
derived_type, |
|
|
|
base_type |
|
) |
| virtual derived_type* copy(void) const { return new derived_type(*this); } |
◆ AutoCont
#define AutoCont ActivePtr |
◆ AutoContReg
◆ COPY_TYPE_CHECK
◆ CountProtPtr
#define CountProtPtr CountPassivePtr |
◆ macro_copy_body
#define macro_copy_body |
( |
|
type | ) |
type* type::copy(void) const { return new type(*this); } |
◆ macro_copy_body_not_defined
#define macro_copy_body_not_defined |
( |
|
type | ) |
|
Value: type* type::copy(void) const { \
mcerr <<
"macro_copy_body_not_defined(" << #type <<
"): forbidden call\n"; \
return NULL; \
}
Definition at line 299 of file AbsPtr.h.
◆ macro_copy_header
#define macro_copy_header |
( |
|
type | ) |
virtual type* copy(void) const |
◆ macro_copy_total
#define macro_copy_total |
( |
|
type | ) |
virtual type* copy(void) const { return new type(*this); } |
◆ macro_copy_total_zero
#define macro_copy_total_zero |
( |
|
type | ) |
virtual type* copy(void) const = 0 |
◆ PILF_CONST
◆ PILF_MUTABLE
#define PILF_MUTABLE mutable |
◆ ProtPtr
◆ RegProtPtr
#define RegProtPtr RegPassivePtr |
◆ USE_CHAR_CONTROL_VARIABLES
#define USE_CHAR_CONTROL_VARIABLES |
◆ USE_CHAR_GETSETTERS_PARAMETERS
#define USE_CHAR_GETSETTERS_PARAMETERS |
◆ USE_DELETE_AT_ZERO_COUNT
#define USE_DELETE_AT_ZERO_COUNT |
◆ USE_DOUBLE_PTR_IN_PASSIVEPTR
#define USE_DOUBLE_PTR_IN_PASSIVEPTR |
◆ USE_GETSETTERS_IN_PASSIVEPTR
#define USE_GETSETTERS_IN_PASSIVEPTR |
◆ USE_OLD_POINTER_NAMES [1/3]
#define USE_OLD_POINTER_NAMES |
◆ USE_OLD_POINTER_NAMES [2/3]
#define USE_OLD_POINTER_NAMES |
◆ USE_OLD_POINTER_NAMES [3/3]
#define USE_OLD_POINTER_NAMES |
◆ USE_PRIVATE_PARAM_IN_PASSIVEPTR
#define USE_PRIVATE_PARAM_IN_PASSIVEPTR |
◆ virt_common_base
◆ virt_common_base_col
◆ virt_common_base_col_comma
#define virt_common_base_col_comma |
◆ virt_common_base_comma
#define virt_common_base_comma |
◆ virt_common_base_pcomma
#define virt_common_base_pcomma |
◆ Clone
◆ Pass
◆ Pilfer
◆ exchange()
template<class X , class C >
void exchange |
( |
ActivePtr< X, C > & |
f1, |
|
|
ActivePtr< X, C > & |
f2 |
|
) |
| |
|
inline |
Definition at line 879 of file AbsPtr.h.
879 {
880 X* ptr = f1.extract();
881 f1.pass(f2.extract());
882 f2.pass(ptr);
883}
◆ operator<()
Definition at line 2311 of file AbsPtr.h.
2313 {
2314 return f1.get() < f2.get();
2315}
◆ operator<<() [1/5]
std::ostream & operator<< |
( |
std::ostream & |
file, |
|
|
const AbsCont & |
f |
|
) |
| |
|
inline |
Definition at line 337 of file AbsPtr.h.
337 {
338 Ifile <<
"operator<<AbsCont& is called.\n";
340
341 return file;
342}
virtual void print(std::ostream &file, int l) const
◆ operator<<() [2/5]
template<class X , class C >
std::ostream & operator<< |
( |
std::ostream & |
file, |
|
|
const ActivePtr< X, C > & |
f |
|
) |
| |
Definition at line 766 of file AbsPtr.h.
766 {
767 Ifile <<
"ActivePtr<X,C>: ";
768 if (f.get() == NULL)
769 file << " ptr==NULL. \n";
770 else {
771 file << " ptr!=NULL: ";
773 file << (*f.get());
775 }
776
777
778
779
780
781
782
783
784
785
786
787
788
789 return file;
790}
std::ostream & yesindent(std::ostream &f)
std::ostream & noindent(std::ostream &f)
◆ operator<<() [3/5]
template<class X >
std::ostream & operator<< |
( |
std::ostream & |
file, |
|
|
const ActivePtrReg< X > & |
f |
|
) |
| |
Definition at line 2359 of file AbsPtr.h.
2359 {
2360 Ifile <<
"ActivePtrReg<X>:";
2362 file << (ActivePtr<X>&)f;
2364 return file;
2365}
◆ operator<<() [4/5]
std::ostream & operator<< |
( |
std::ostream & |
file, |
|
|
const DoubleReg & |
f |
|
) |
| |
Definition at line 268 of file AbsPtr.cpp.
270 {
272 return file;
273}
◆ operator<<() [5/5]
template<class X >
std::ostream & operator<< |
( |
std::ostream & |
file, |
|
|
const PassivePtr< X > & |
f |
|
) |
| |
Definition at line 1839 of file AbsPtr.h.
1839 {
1840 Ifile <<
"PassivePtr<X>:";
1841 if (f.get() == NULL)
1842 file << " pointer is NULL, no object, number of ref's is "
1843 << f.get_total_number_of_references() << "\n";
1844 else {
1846 file << (*f.get());
1849 Ifile <<
"number of ref's is " << f.get_total_number_of_references()
1850 << '\n';
1852
1853 }
1854 return file;
1855}
◆ operator==()
Definition at line 2280 of file AbsPtr.h.
2282 {
2283
2284 return f1.get() == f2.get();
2285}
◆ operator>>()
template<class X , class C >
std::istream & operator>> |
( |
std::istream & |
file, |
|
|
ActivePtr< X, C > & |
f |
|
) |
| |
Definition at line 793 of file AbsPtr.h.
793 {
794 long q = 13;
795 long n;
796 char keyline[13];
797 for (n = 0; n < q - 1; n++) {
798 keyline[n] = file.get();
799 }
800 keyline[n] = '\0';
801 if (!strcmp(&(keyline[0]), " ptr==NULL. ")) {
802 f.clear();
803 } else {
804 X x;
805 file >> x;
806 f.put(x);
807 }
808 return file;
809}