Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
virt_common_base_col< X, C > Class Template Reference

#include <vec.h>

Public Member Functions

 absref_transmit (void)
 
 absref_transmit (int fqaref, absref absref::**faref)
 
 absref_transmit (int fqaref_pointer, absref **faref_pointer)
 
 absref_transmit (int fqaref, absref absref::**faref, int fqaref_pointer, absref **faref_pointer)
 
 absref_transmit (const absref_transmit &f)
 
 macro_copy_header (absref_transmit)
 
virtual void print (std::ostream &file, int l) const
 
virtual absrefget_other (int n)
 
virtual ~absref_transmit ()
 
X * operator-> (void) const
 
X & operator* (void) const
 
X * getver (void) const
 
X * get (void) const
 
void put (const X *fptr)
 
void pass (X *fptr)
 
X * extract (void)
 
void clear (void)
 
void pilfer (PILF_CONST ActivePtr< X, C > &f)
 Attention: actually not const.
 
void print (std::ostream &file, int l=1) const
 
 ActivePtr (void)
 
 ActivePtr (const X *fptr, Clone)
 
 ActivePtr (const ActivePtr< X, C > &f)
 
 ActivePtr (PILF_CONST ActivePtr< X, C > &f, Pilfer)
 
 ActivePtr (X *fptr, Pass)
 
ActivePtr & operator= (const ActivePtr< X, C > &f)
 
 macro_copy_total (ActivePtr)
 
virtual ~ActivePtr ()
 
 RegPassivePtr (void)
 
 RegPassivePtr (char fs_ban_del, char fs_ban_sub, char fs_ban_cop=0)
 
 RegPassivePtr (const RegPassivePtr &f)
 
RegPassivePtr & operator= (const RegPassivePtr &f)
 
CountPP_ns::CountPassivePtrbook (void) const
 
void clear_pointers (void) const
 
 macro_copy_total (RegPassivePtr)
 
virtual ~RegPassivePtr ()
 
virtual void print (std::ostream &file, int l=1) const
 
void set_s_ban_del (char fs_ban_del)
 
char get_s_ban_del (void) const
 
void set_s_ban_sub (char fs_ban_sub)
 
char get_s_ban_sub (void) const
 
void set_s_ban_cop (char fs_ban_cop)
 
char get_s_ban_cop (void) const
 
void set_s_allow_del_at_zero_count (char fs_allow_del_at_zero_count)
 
char get_s_allow_del_at_zero_count (void) const
 
long get_total_number_of_references (void) const
 
X * get (void) const
 
void put (X *fptr)
 
 PassivePtr (void)
 
 PassivePtr (X *fptr)
 
 PassivePtr (X &fptr)
 
 PassivePtr (const PassivePtr< X > &f)
 
PassivePtr< X > & operator= (const PassivePtr< X > &f)
 
PassivePtr< X > & operator= (X *f)
 
template<class Y >
 PassivePtr (const PassivePtr< Y > &f)
 
void move_pointer (PassivePtr< X > &f)
 
X * operator-> (void) const
 
X & operator* (void) const
 
X * getver (void) const
 
long get_total_number_of_references (void) const
 
void print (std::ostream &file, int l=1) const
 
 macro_copy_total (PassivePtr)
 
virtual ~PassivePtr ()
 

Static Public Member Functions

static void set_s_ban_del_ignore (char fs_ban_del_ignore)
 
static char get_s_ban_del_ignore (void)
 
static void set_s_print_adr_cpp (char fs_print_adr_cpp)
 
static char get_s_print_adr_cpp (void)
 

Public Attributes

int qaref
 
absrefabsref::** aref
 
int qaref_pointer
 
absref ** aref_pointer
 
int qaref_other
 

Friends

class CountPP_ns::CountPassivePtr
 
class RegPassivePtr
 
std::ostream & operator<< (std::ostream &file, const RegPassivePtr &f)
 

Detailed Description

template<class X, class C = StandardCopyDefinition<X>>
class virt_common_base_col< X, C >

Definition at line 165 of file vec.h.

Constructor & Destructor Documentation

◆ ~absref_transmit()

template<class X , class C = StandardCopyDefinition<X>>
virtual virt_common_base_col< X, C >::~absref_transmit ( )
inlinevirtual

Definition at line 217 of file vec.h.

217{ ; }

◆ ~ActivePtr()

template<class X , class C = StandardCopyDefinition<X>>
virtual virt_common_base_col< X, C >::~ActivePtr ( )
inlinevirtual

Definition at line 709 of file AbsPtr.h.

716 {
717 if (ptr != NULL) {
718 delete ptr;
719 ptr = NULL;
720 }
721 }

◆ ~RegPassivePtr()

template<class X , class C = StandardCopyDefinition<X>>
virtual virt_common_base_col< X, C >::~RegPassivePtr ( )
virtual

◆ ~PassivePtr()

template<class X , class C = StandardCopyDefinition<X>>
virtual virt_common_base_col< X, C >::~PassivePtr ( )
virtual

Member Function Documentation

◆ absref_transmit() [1/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::absref_transmit ( const absref_transmit &  f)
inline

Definition at line 207 of file vec.h.

207{ *this = f; }

◆ absref_transmit() [2/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::absref_transmit ( int  fqaref,
absref absref::**  faref 
)
inline

Definition at line 187 of file vec.h.

188 : qaref(fqaref), aref(faref), qaref_pointer(0), qaref_other(0) {
189 ;
190 }
absrefabsref::** aref
Definition: vec.h:170

◆ absref_transmit() [3/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::absref_transmit ( int  fqaref,
absref absref::**  faref,
int  fqaref_pointer,
absref **  faref_pointer 
)
inline

Definition at line 198 of file vec.h.

200 : qaref(fqaref),
201 aref(faref),
202 qaref_pointer(fqaref_pointer),
203 aref_pointer(faref_pointer),
204 qaref_other(0) {
205 ;
206 }
absref ** aref_pointer
Definition: vec.h:176

◆ absref_transmit() [4/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::absref_transmit ( int  fqaref_pointer,
absref **  faref_pointer 
)
inline

Definition at line 191 of file vec.h.

192 : qaref(0),
193 qaref_pointer(fqaref_pointer),
194 aref_pointer(faref_pointer),
195 qaref_other(0) {
196 ;
197 }

◆ absref_transmit() [5/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::absref_transmit ( void  )
inline

Definition at line 186 of file vec.h.

186: qaref(0), qaref_pointer(0), qaref_other(0) { ; }

◆ ActivePtr() [1/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::ActivePtr ( const ActivePtr< X, C > &  f)
inline

Definition at line 677 of file AbsPtr.h.

678 : ptr(f.ptr != NULL ? C::copy(f.ptr) : f.ptr)
679#ifndef DEBUG_ACTIVEPTR
680 {
681 }

◆ ActivePtr() [2/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::ActivePtr ( const X *  fptr,
Clone   
)
inline

Definition at line 659 of file AbsPtr.h.

660 : ptr(fptr != NULL ? C::copy(fptr) : ((X*)NULL))
661#ifndef DEBUG_ACTIVEPTR
662 {
663 } //normal case

◆ ActivePtr() [3/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::ActivePtr ( PILF_CONST ActivePtr< X, C > &  f,
Pilfer   
)
inline

Attention: actually not const

Definition at line 689 of file AbsPtr.h.

690 : ptr(f.ptr) { //!Attention: actually not const
691#ifdef DEBUG_ACTIVEPTR
692 mcout << "ActivePtr(const ActivePtr<X,C>& f, Pilfer) is run\n";
693#endif
694 f.ptr = NULL;
695 } // debug
#define mcout
Definition: prstream.h:133

◆ ActivePtr() [4/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::ActivePtr ( void  )
inline

Definition at line 646 of file AbsPtr.h.

646: ptr(NULL) {}

◆ ActivePtr() [5/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::ActivePtr ( X *  fptr,
Pass   
)
inline

Definition at line 698 of file AbsPtr.h.

698: ptr(fptr) {}

◆ book()

template<class X , class C = StandardCopyDefinition<X>>
CountPP_ns::CountPassivePtr * virt_common_base_col< X, C >::book ( void  ) const
inline

Definition at line 1243 of file AbsPtr.h.

1243 {
1244 if (cpp == NULL) {
1245 cpp = new CountPP_ns::CountPassivePtr(this);
1246 }
1247 cpp->book();
1248 return cpp;
1249 }

◆ clear()

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::clear ( void  )
inline

Definition at line 609 of file AbsPtr.h.

609 {
610#ifdef DEBUG_ACTIVEPTR
611 mcout << "ActivePtr::clear is called, ptr =" << ptr << '\n';
612#endif
613 if (ptr != NULL) {
614 delete ptr;
615 ptr = NULL;
616 }
617 }

◆ clear_pointers()

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::clear_pointers ( void  ) const
inline

Definition at line 1251 of file AbsPtr.h.

1253 {
1254 if (cpp != NULL) cpp->change_rpp(NULL);
1255 }
void change_rpp(const RegPassivePtr *frpp)
Definition: AbsPtr.h:1041

◆ extract()

template<class X , class C = StandardCopyDefinition<X>>
X * virt_common_base_col< X, C >::extract ( void  )
inline

Definition at line 604 of file AbsPtr.h.

604 {
605 X* ret = ptr;
606 ptr = NULL;
607 return ret;
608 }

◆ get() [1/2]

template<class X , class C = StandardCopyDefinition<X>>
X * virt_common_base_col< X, C >::get ( void  ) const
inline

Definition at line 541 of file AbsPtr.h.

541{ return ptr; }

◆ get() [2/2]

template<class X , class C = StandardCopyDefinition<X>>
X * virt_common_base_col< X, C >::get ( void  ) const
inline

Definition at line 1684 of file AbsPtr.h.

1684 {
1685 if (cpp == NULL) return NULL;
1686#ifdef USE_DOUBLE_PTR_IN_PASSIVEPTR
1687
1688 if (cpp->get_rpp() == NULL) return NULL;
1689#ifdef USE_CHECK_DOUBLE_PTR_IN_PASSIVEPTR
1690 X* temp_ptr = dynamic_cast<X*>(const_cast<RegPassivePtr*>(cpp->get_rpp()));
1691 if (ptr != temp_ptr) {
1692 mcerr << "Error in inline X* PassivePtr::get(void):\n";
1693 mcerr << "ptr != temp_ptr\n";
1694 spexit(mcerr);
1695 }
1696#endif
1697 return ptr;
1698#else // for ifdef USE_DOUBLE_PTR_IN_PASSIVEPTR
1699
1700#ifdef USE_DYNCAST_IN_PASSIVEPTR
1701 //else return dynamic_cast< X* >
1702 // (const_cast< RegPassivePtr* >( cpp->get_rpp() ) );
1703 const RegPassivePtr* rpp = cpp->get_rpp();
1704 if (rpp == NULL) return NULL;
1705 X* temp_ptr = dynamic_cast<X*>(const_cast<RegPassivePtr*>(rpp));
1706 if (temp_ptr == NULL) {
1707 mcerr << "Error in inline X* PassivePtr::get(void):\n"
1708 << " dynamic cast from RegPassivePtr to X* is not successful."
1709 << " You have probably tried to address with passive pointer "
1710 << " an object which is not derived from RegPassivePtr\n";
1711 spexit(mcerr);
1712 }
1713 return temp_ptr;
1714#else // for ifdef USE_DYNCAST_IN_PASSIVEPTR
1715 else return (X*)(cpp->get_rpp());
1716#endif // for ifdef USE_DYNCAST_IN_PASSIVEPTR
1717
1718#endif // for ifdef USE_DOUBLE_PTR_IN_PASSIVEPTR
1719 }
#define spexit(stream)
Definition: FunNameStack.h:536
const RegPassivePtr * get_rpp(void)
Definition: AbsPtr.h:1040
friend class RegPassivePtr
Definition: AbsPtr.h:1682
#define mcerr
Definition: prstream.h:135

◆ get_other()

template<class X , class C = StandardCopyDefinition<X>>
virtual absref * virt_common_base_col< X, C >::get_other ( int  n)
virtual

◆ get_s_allow_del_at_zero_count()

template<class X , class C = StandardCopyDefinition<X>>
char virt_common_base_col< X, C >::get_s_allow_del_at_zero_count ( void  ) const
inline

Definition at line 1610 of file AbsPtr.h.

1615 {
1616 if ((control_word & eb_s_allow_del_at_zero_count) != 0)
1617 return 1;
1618 else
1619 return 0;
1620 }
1621#elif defined(USE_BIT_FIELDS)
1622 { return conparam.s_allow_del_at_zero_count; }
1623#else
1624 { return s_allow_del_at_zero_count; }

◆ get_s_ban_cop()

template<class X , class C = StandardCopyDefinition<X>>
char virt_common_base_col< X, C >::get_s_ban_cop ( void  ) const
inline

Definition at line 1556 of file AbsPtr.h.

1561 {
1562 if ((control_word & eb_s_ban_cop2) == 0) {
1563 if ((control_word & eb_s_ban_cop1) == 0)
1564 return 0;
1565 else
1566 return 1;
1567 } else {
1568 return 2;
1569 }
1570 }
1571#elif defined USE_BIT_FIELDS
1572 { return conparam.s_ban_cop; }
1573#else
1574 { return s_ban_cop; }

◆ get_s_ban_del()

template<class X , class C = StandardCopyDefinition<X>>
char virt_common_base_col< X, C >::get_s_ban_del ( void  ) const
inline

Definition at line 1420 of file AbsPtr.h.

1425 {
1426 if ((control_word & eb_s_ban_del) != 0)
1427 return 1;
1428 else
1429 return 0;
1430 }
1431#elif defined(USE_BIT_FIELDS)
1432 { return conparam.s_ban_del; }
1433#else
1434 { return s_ban_del; }

◆ get_s_ban_del_ignore()

template<class X , class C = StandardCopyDefinition<X>>
static char virt_common_base_col< X, C >::get_s_ban_del_ignore ( void  )
inlinestatic

Definition at line 1455 of file AbsPtr.h.

1459 {
1460 return s_ban_del_ignore;
1461 }

◆ get_s_ban_sub()

template<class X , class C = StandardCopyDefinition<X>>
char virt_common_base_col< X, C >::get_s_ban_sub ( void  ) const
inline

Definition at line 1498 of file AbsPtr.h.

1503 {
1504 if ((control_word & eb_s_ban_sub2) == 0) {
1505 if ((control_word & eb_s_ban_sub1) == 0)
1506 return 0;
1507 else
1508 return 1;
1509 } else {
1510 //Iprintn(mcout, (control_word & eb_s_ban_sub1) );
1511 //Iprintn(mcout, (control_word & eb_s_ban_sub2) );
1512 return 2;
1513 }
1514 }
1515#elif defined(USE_BIT_FIELDS)
1516 { return conparam.s_ban_sub; }
1517#else
1518 { return s_ban_sub; }

◆ get_s_print_adr_cpp()

template<class X , class C = StandardCopyDefinition<X>>
static char virt_common_base_col< X, C >::get_s_print_adr_cpp ( void  )
inlinestatic

Definition at line 1647 of file AbsPtr.h.

1651 {
1652 return s_print_adr_cpp;
1653 }

◆ get_total_number_of_references() [1/2]

template<class X , class C = StandardCopyDefinition<X>>
long virt_common_base_col< X, C >::get_total_number_of_references ( void  ) const

◆ get_total_number_of_references() [2/2]

template<class X , class C = StandardCopyDefinition<X>>
long virt_common_base_col< X, C >::get_total_number_of_references ( void  ) const
inline

Definition at line 1790 of file AbsPtr.h.

1790 {
1791 if (cpp == NULL)
1792 return 0;
1793 else
1794 return cpp->get_number_of_booked();
1795 }
long get_number_of_booked(void)
Definition: AbsPtr.h:1039

◆ getver() [1/2]

template<class X , class C = StandardCopyDefinition<X>>
X * virt_common_base_col< X, C >::getver ( void  ) const
inline

◆ getver() [2/2]

template<class X , class C = StandardCopyDefinition<X>>
X * virt_common_base_col< X, C >::getver ( void  ) const
inline

◆ macro_copy_header()

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::macro_copy_header ( absref_transmit  )

◆ macro_copy_total() [1/3]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::macro_copy_total ( ActivePtr  )

◆ macro_copy_total() [2/3]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::macro_copy_total ( PassivePtr  )

◆ macro_copy_total() [3/3]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::macro_copy_total ( RegPassivePtr  )

◆ move_pointer()

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::move_pointer ( PassivePtr< X > &  f)
inline

◆ operator*() [1/2]

template<class X , class C = StandardCopyDefinition<X>>
X & virt_common_base_col< X, C >::operator* ( void  ) const
inline

◆ operator*() [2/2]

template<class X , class C = StandardCopyDefinition<X>>
X & virt_common_base_col< X, C >::operator* ( void  ) const
inline

◆ operator->() [1/2]

template<class X , class C = StandardCopyDefinition<X>>
X * virt_common_base_col< X, C >::operator-> ( void  ) const
inline

◆ operator->() [2/2]

template<class X , class C = StandardCopyDefinition<X>>
X * virt_common_base_col< X, C >::operator-> ( void  ) const
inline

◆ operator=() [1/4]

template<class X , class C = StandardCopyDefinition<X>>
ActivePtr & virt_common_base_col< X, C >::operator= ( const ActivePtr< X, C > &  f)
inline

Definition at line 700 of file AbsPtr.h.

700 {
701#ifdef DEBUG_ACTIVEPTR
702 mcout << "inline ActivePtr& operator=(const ActivePtr<X,C>& f)\n";
703#endif
704 if (this != &f) put(f.ptr);
705 return *this;
706 }
void put(const X *fptr)
Definition: AbsPtr.h:551

◆ operator=() [2/4]

template<class X , class C = StandardCopyDefinition<X>>
PassivePtr< X > & virt_common_base_col< X, C >::operator= ( const PassivePtr< X > &  f)
inline

◆ operator=() [3/4]

template<class X , class C = StandardCopyDefinition<X>>
RegPassivePtr & virt_common_base_col< X, C >::operator= ( const RegPassivePtr &  f)

◆ operator=() [4/4]

template<class X , class C = StandardCopyDefinition<X>>
PassivePtr< X > & virt_common_base_col< X, C >::operator= ( X *  f)
inline

◆ pass()

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::pass ( X *  fptr)
inline

Definition at line 574 of file AbsPtr.h.

583 { //
584 //if(ptr!=NULL) delete ptr;
585
586 if (ptr != NULL) {
587 if (fptr != NULL) {
588 mcerr << "ERROR in ActivePtr::pass(X* fptr):\n";
589 mcerr << "Both the destination and source pointers are not empty\n";
590 // if f belongs to *ptr, deletion of *ptr would lead to
591 // deletion of f. In order to avoid this unexpected behaviour,
592 // we interprete non-zero ptr as error.
593 // The user should clear ptr first and then use this function.
594 spexit(mcerr);
595 } else {
596 delete ptr;
597 }
598 }
599 ptr = fptr;
600 }

◆ PassivePtr() [1/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::PassivePtr ( const PassivePtr< X > &  f)
inline

◆ PassivePtr() [2/5]

template<class X , class C = StandardCopyDefinition<X>>
template<class Y >
virt_common_base_col< X, C >::PassivePtr ( const PassivePtr< Y > &  f)

◆ PassivePtr() [3/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::PassivePtr ( void  )
inline

Definition at line 1733 of file AbsPtr.h.

1734 : cpp(NULL)
1735#ifdef USE_DOUBLE_PTR_IN_PASSIVEPTR
1736 ,
1737 ptr(NULL)
1738#endif
1739 {
1740 }

◆ PassivePtr() [4/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::PassivePtr ( X &  fptr)
inline

Definition at line 1754 of file AbsPtr.h.

1754 {
1755 cpp = fptr.book();
1756#ifdef USE_DOUBLE_PTR_IN_PASSIVEPTR
1757 ptr = &fptr;
1758#endif
1759 }

◆ PassivePtr() [5/5]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::PassivePtr ( X *  fptr)
inline

Definition at line 1743 of file AbsPtr.h.

1743 {
1744 if (fptr != NULL)
1745 cpp = fptr->book();
1746 else
1747 cpp = NULL;
1748#ifdef USE_DOUBLE_PTR_IN_PASSIVEPTR
1749 ptr = fptr;
1750#endif
1751 }

◆ pilfer()

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::pilfer ( PILF_CONST ActivePtr< X, C > &  f)
inline

Attention: actually not const.

Definition at line 619 of file AbsPtr.h.

621 {
622#ifdef DEBUG_ACTIVEPTR
623 mcout << "ActivePtr::pilfer is called\n";
624#endif
625 if (this != &f) {
626 if (ptr != NULL) {
627 if (f.ptr != NULL) {
628 mcerr << "ERROR in ActivePtr::pilfer(...):\n";
629 mcerr << "Both the destination and source pointers are not empty\n";
630 // if f belongs to *ptr, deletion of *ptr would lead to
631 // deletion of f. In order to avoid this unexpected behaviour,
632 // we interprete non-zero ptr as error.
633 // The user should clear ptr first and then use this function.
634 spexit(mcerr);
635 } else {
636 delete ptr;
637 }
638 }
639 ptr = f.ptr;
640 f.ptr = NULL;
641 }
642 return;
643 }

◆ print() [1/4]

template<class X , class C = StandardCopyDefinition<X>>
virtual void virt_common_base_col< X, C >::print ( std::ostream &  file,
int  l 
) const
virtual

◆ print() [2/4]

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::print ( std::ostream &  file,
int  l = 1 
) const

◆ print() [3/4]

template<class X , class C = StandardCopyDefinition<X>>
virtual void virt_common_base_col< X, C >::print ( std::ostream &  file,
int  l = 1 
) const
virtual

◆ print() [4/4]

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::print ( std::ostream &  file,
int  l = 1 
) const

◆ put() [1/2]

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::put ( const X *  fptr)
inline

Definition at line 551 of file AbsPtr.h.

554 { //
555#ifdef DEBUG_ACTIVEPTR
556 mcout << "inline void put(const X* fptr)\n";
557 Iprintn(mcout, ptr);
558 mcout << "Type of X is (in internal notations) " << typeid(X).name()
559 << '\n';
560 mcout << "Type of *fptr is (in internal notations) " << typeid(*fptr).name()
561 << '\n';
562#endif
563 // Initialization of copy should go ahead, since
564 // object *fptr could be dependant or part of *this,
565 // and could be deleted prior to copying at the reverse order.
566 X* ptr_temp = (fptr != NULL ? C::copy(fptr) : (X*)(NULL));
567 if (ptr != NULL) delete ptr;
568 ptr = ptr_temp;
569#ifdef DEBUG_ACTIVEPTR
570 mcout << "finishing inline void put(const X* fptr):\n";
571 Iprintn(mcout, ptr);
572#endif
573 }
#define Iprintn(file, name)
Definition: prstream.h:216

◆ put() [2/2]

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::put ( X *  fptr)
inline

◆ RegPassivePtr() [1/3]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::RegPassivePtr ( char  fs_ban_del,
char  fs_ban_sub,
char  fs_ban_cop = 0 
)
inline

Definition at line 1209 of file AbsPtr.h.

1210 :
1211#else
1212 inline RegPassivePtr(int fs_ban_del, int fs_ban_sub, int fs_ban_cop = 0)
1213 :
1214#endif
1215#ifdef USE_BIT_OPERA
1216 control_word(0),
1217#elif defined(USE_BIT_FIELDS)
1218 conparam(fs_ban_del, fs_ban_sub, fs_ban_cop),
1219#else
1220 s_ban_del(fs_ban_del),
1221 s_ban_sub(fs_ban_sub),
1222 s_ban_cop(fs_ban_cop),
1224 s_allow_del_at_zero_count(0),
1225#endif
1226#endif
1227 cpp(NULL) {
1228#ifdef USE_BIT_OPERA
1229 set_s_ban_del(fs_ban_del);
1230 set_s_ban_sub(fs_ban_sub);
1231 set_s_ban_cop(fs_ban_cop);
1232#endif
1233 }
#define USE_DELETE_AT_ZERO_COUNT
Definition: AbsPtr.h:50
void set_s_ban_sub(char fs_ban_sub)
Definition: AbsPtr.h:1464
void set_s_ban_del(char fs_ban_del)
Definition: AbsPtr.h:1392
void set_s_ban_cop(char fs_ban_cop)
Definition: AbsPtr.h:1522

◆ RegPassivePtr() [2/3]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::RegPassivePtr ( const RegPassivePtr &  f)

◆ RegPassivePtr() [3/3]

template<class X , class C = StandardCopyDefinition<X>>
virt_common_base_col< X, C >::RegPassivePtr ( void  )
inline

Definition at line 1192 of file AbsPtr.h.

1193 :
1194#ifdef USE_BIT_OPERA
1195 control_word(0),
1196#elif defined USE_BIT_FIELDS
1197 conparam(),
1198#else
1199 s_ban_del(0),
1200 s_ban_sub(0),
1201 s_ban_cop(0),
1202#ifdef USE_DELETE_AT_ZERO_COUNT
1203 s_allow_del_at_zero_count(0),
1204#endif
1205#endif
1206 cpp(NULL) {
1207 }

◆ set_s_allow_del_at_zero_count()

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::set_s_allow_del_at_zero_count ( char  fs_allow_del_at_zero_count)
inline

Definition at line 1580 of file AbsPtr.h.

1584 {
1585#ifdef USE_BIT_OPERA
1586 if (fs_allow_del_at_zero_count == 0)
1587 clear_bit(control_word, eb_s_allow_del_at_zero_count);
1588 else if (fs_allow_del_at_zero_count == 1)
1589 rise_bit(control_word, eb_s_allow_del_at_zero_count);
1590#else
1591 if (fs_allow_del_at_zero_count == 0 || fs_allow_del_at_zero_count == 1) {
1592#ifdef USE_BIT_FIELDS
1593 conparam.s_allow_del_at_zero_count = fs_allow_del_at_zero_count;
1594#else
1595 s_allow_del_at_zero_count = fs_allow_del_at_zero_count;
1596#endif
1597 }
1598#endif
1599 else {
1600 mcerr << "ERROR in inline void set_s_allow_del_at_zero_count(int "
1601 "fs_allow_del_at_zero_count):\n";
1602 mcerr << "s_allow_del_at_zero_count is outside limits, "
1603 "s_allow_del_at_zero_count=" << int(fs_allow_del_at_zero_count)
1604 << '\n';
1605 spexit(mcerr);
1606 }
1607 }

◆ set_s_ban_cop()

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::set_s_ban_cop ( char  fs_ban_cop)
inline

Definition at line 1522 of file AbsPtr.h.

1526 {
1527#ifdef USE_BIT_OPERA
1528 if (fs_ban_cop == 0) {
1529 clear_bit(control_word, eb_s_ban_cop1);
1530 clear_bit(control_word, eb_s_ban_cop2);
1531 } else if (fs_ban_cop == 1) {
1532 rise_bit(control_word, eb_s_ban_cop1);
1533 clear_bit(control_word, eb_s_ban_cop2);
1534 } else if (fs_ban_cop == 2) {
1535 clear_bit(control_word, eb_s_ban_cop1);
1536 rise_bit(control_word, eb_s_ban_cop2);
1537 }
1538#else
1539 if (fs_ban_cop >= 0 && fs_ban_cop <= 2) {
1540#ifdef USE_BIT_FIELDS
1541 conparam.s_ban_cop = fs_ban_cop;
1542#else
1543 s_ban_cop = fs_ban_cop;
1544#endif
1545 }
1546#endif
1547 else {
1548 mcerr << "ERROR in inline void set_s_ban_cop(int fs_ban_cop):\n";
1549 mcerr << "s_ban_cop is outside limits, s_ban_cop=" << int(fs_ban_cop)
1550 << '\n';
1551 spexit(mcerr);
1552 }
1553 }

◆ set_s_ban_del()

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::set_s_ban_del ( char  fs_ban_del)
inline

Definition at line 1392 of file AbsPtr.h.

1396 {
1397#ifdef USE_BIT_OPERA
1398 if (fs_ban_del == 0)
1399 clear_bit(control_word, eb_s_ban_del);
1400 else if (fs_ban_del == 1)
1401 rise_bit(control_word, eb_s_ban_del);
1402#else
1403 if (fs_ban_del == 0 || fs_ban_del == 1) {
1404#ifdef USE_BIT_FIELDS
1405 conparam.s_ban_del = fs_ban_del;
1406#else
1407 s_ban_del = fs_ban_del;
1408#endif
1409 }
1410#endif
1411 else {
1412 mcerr << "ERROR in inline void set_s_ban_del(int fs_ban_del):\n";
1413 mcerr << "s_ban_del is outside limits, s_ban_del=" << int(fs_ban_del)
1414 << '\n';
1415 spexit(mcerr);
1416 }
1417 }

◆ set_s_ban_del_ignore()

template<class X , class C = StandardCopyDefinition<X>>
static void virt_common_base_col< X, C >::set_s_ban_del_ignore ( char  fs_ban_del_ignore)
inlinestatic

Definition at line 1438 of file AbsPtr.h.

1442 {
1443 if (fs_ban_del_ignore == 0 || fs_ban_del_ignore == 1) {
1444 s_ban_del_ignore = fs_ban_del_ignore;
1445 } else {
1446 mcerr << "ERROR in inline void set_s_ban_del_ignore(int "
1447 "fs_ban_del_ignore ):\n";
1448 mcerr << "s_ban_del_ignore is outside limits, s_ban_del_ignore="
1449 << int(fs_ban_del_ignore) << '\n';
1450 spexit(mcerr);
1451 }
1452 }

◆ set_s_ban_sub()

template<class X , class C = StandardCopyDefinition<X>>
void virt_common_base_col< X, C >::set_s_ban_sub ( char  fs_ban_sub)
inline

Definition at line 1464 of file AbsPtr.h.

1468 {
1469#ifdef USE_BIT_OPERA
1470 if (fs_ban_sub == 0) {
1471 clear_bit(control_word, eb_s_ban_sub1);
1472 clear_bit(control_word, eb_s_ban_sub2);
1473 } else if (fs_ban_sub == 1) {
1474 rise_bit(control_word, eb_s_ban_sub1);
1475 clear_bit(control_word, eb_s_ban_sub2);
1476 } else if (fs_ban_sub == 2) {
1477 clear_bit(control_word, eb_s_ban_sub1);
1478 rise_bit(control_word, eb_s_ban_sub2);
1479 }
1480#else
1481 if (fs_ban_sub >= 0 && fs_ban_sub <= 2) {
1482#ifdef USE_BIT_FIELDS
1483 conparam.s_ban_sub = fs_ban_sub;
1484#else
1485 s_ban_sub = fs_ban_sub;
1486#endif
1487 }
1488#endif
1489 else {
1490 mcerr << "ERROR in inline void set_s_ban_sub(int fs_ban_sub):\n";
1491 mcerr << "s_ban_sub is outside limits, s_ban_sub=" << int(fs_ban_sub)
1492 << '\n';
1493 spexit(mcerr);
1494 }
1495 }

◆ set_s_print_adr_cpp()

template<class X , class C = StandardCopyDefinition<X>>
static void virt_common_base_col< X, C >::set_s_print_adr_cpp ( char  fs_print_adr_cpp)
inlinestatic

Definition at line 1630 of file AbsPtr.h.

1634 {
1635 if (fs_print_adr_cpp == 0 || fs_print_adr_cpp == 1) {
1636 s_print_adr_cpp = fs_print_adr_cpp;
1637 } else {
1638 mcerr << "ERROR in inline void set_s_print_adr_cpp(int fs_print_adr_cpp "
1639 "):\n";
1640 mcerr << "s_print_adr_cpp is outside limits, s_print_adr_cpp="
1641 << int(fs_print_adr_cpp) << '\n';
1642 spexit(mcerr);
1643 }
1644 }

Friends And Related Function Documentation

◆ CountPP_ns::CountPassivePtr

template<class X , class C = StandardCopyDefinition<X>>
friend class CountPP_ns::CountPassivePtr
friend

Definition at line 1094 of file AbsPtr.h.

◆ operator<<

template<class X , class C = StandardCopyDefinition<X>>
std::ostream & operator<< ( std::ostream &  file,
const RegPassivePtr &  f 
)
friend

Definition at line 165 of file AbsPtr.cpp.

165 {
166#ifdef USE_BIT_OPERA
167#ifdef USE_CHAR_GETSETTERS_PARAMETERS
168 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << int(f.get_s_ban_del())
169 << "/" << int(f.get_s_ban_sub()) << "/" << int(f.get_s_ban_cop());
170#else
171 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << f.get_s_ban_del() << "/"
172 << f.get_s_ban_sub() << "/" << f.get_s_ban_cop();
173#endif
174#elif defined USE_BIT_FIELDS
175 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << f.conparam.s_ban_del << "/"
176 << f.conparam.s_ban_sub << "/" << f.conparam.s_ban_cop;
177#else
178#ifdef USE_CHAR_CONTROL_VARIABLES
179 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << int(f.s_ban_del) << "/"
180 << int(f.s_ban_sub) << "/" << int(f.s_ban_cop);
181#else
182 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << f.s_ban_del << "/"
183 << f.s_ban_sub << "/" << f.s_ban_cop;
184#endif
185#endif
186 /*
187 Ifile<<"RegPassivePtr<X>: s_ban_del="<<f.s_ban_del
188 <<" s_ban_sub="<<f.s_ban_sub
189 <<" s_ban_cop="<<f.s_ban_cop;
190 */
191 if (RegPassivePtr::s_print_adr_cpp == 0) {
192 if (f.cpp == NULL) {
193 file << " cpp=NULL\n";
194 } else {
195 file << " cpp!=NULL\n";
196 }
197 } else {
198 file << " cpp=" << f.cpp << '\n';
199 }
200 if (f.cpp != NULL) {
201 indn.n += 2;
202 Ifile << "cpp->number_of_registered=" << f.cpp->get_number_of_booked()
203 << '\n';
204 indn.n -= 2;
205 }
206#ifdef USE_DELETE_AT_ZERO_COUNT
207 indn.n += 2;
208#ifdef USE_BIT_OPERA
209 Ifile << "s_allow_del_at_zero_count="
210#ifdef USE_CHAR_GETSETTERS_PARAMETERS
211 << int(f.get_s_allow_del_at_zero_count()) << '\n';
212#else
213 << f.get_s_allow_del_at_zero_count() << '\n';
214#endif
215#elif defined(USE_BIT_FIELDS)
216 Ifile << "s_allow_del_at_zero_count=" << f.conparam.s_allow_del_at_zero_count
217 << '\n';
218#else
219#ifdef USE_CHAR_CONTROL_VARIABLES
220 Ifile << "s_allow_del_at_zero_count=" << int(f.s_allow_del_at_zero_count)
221 << '\n';
222#else
223 Ifile << "s_allow_del_at_zero_count=" << f.s_allow_del_at_zero_count << '\n';
224#endif
225#endif
226 indn.n -= 2;
227#endif
228 return file;
229}
indentation indn
Definition: prstream.cpp:13
#define Ifile
Definition: prstream.h:207

◆ RegPassivePtr

template<class X , class C = StandardCopyDefinition<X>>
friend class RegPassivePtr
friend

Definition at line 1682 of file AbsPtr.h.

Member Data Documentation

◆ aref

template<class X , class C = StandardCopyDefinition<X>>
absrefabsref::** virt_common_base_col< X, C >::aref

Definition at line 170 of file vec.h.

◆ aref_pointer

template<class X , class C = StandardCopyDefinition<X>>
absref** virt_common_base_col< X, C >::aref_pointer

Definition at line 176 of file vec.h.

◆ qaref

template<class X , class C = StandardCopyDefinition<X>>
int virt_common_base_col< X, C >::qaref

Definition at line 169 of file vec.h.

◆ qaref_other

template<class X , class C = StandardCopyDefinition<X>>
int virt_common_base_col< X, C >::qaref_other

Definition at line 184 of file vec.h.

◆ qaref_pointer

template<class X , class C = StandardCopyDefinition<X>>
int virt_common_base_col< X, C >::qaref_pointer

Definition at line 175 of file vec.h.


The documentation for this class was generated from the following files: