Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
CLHEP::sp::ctrl_block_pda< P, D, A > Class Template Reference

#include <memory.h>

+ Inheritance diagram for CLHEP::sp::ctrl_block_pda< P, D, A >:

Public Member Functions

 ctrl_block_pda (P *, D, A)
 
 ~ctrl_block_pda () throw ()
 
virtual void * get_deleter (std::type_info const &)
 
virtual void dispose () throw ()
 
virtual void destroy () throw ()
 
- Public Member Functions inherited from CLHEP::sp::abstract_ctrl_block
void class_invariant () const throw ()
 
 abstract_ctrl_block ()
 
virtual ~abstract_ctrl_block () throw ()
 
void add_ref ()
 
bool add_ref_lock ()
 
void weak_add_ref () throw ()
 
virtual void * get_deleter (std::type_info const &ti)=0
 
void release () throw ()
 
void weak_release () throw ()
 
virtual void dispose ()=0 throw ()
 
virtual void destroy () throw ()
 
long use_count () const throw ()
 

Additional Inherited Members

- Protected Member Functions inherited from CLHEP::noncopyable
 noncopyable () throw ()
 
 ~noncopyable () throw ()
 

Detailed Description

template<typename P, typename D, typename A>
class CLHEP::sp::ctrl_block_pda< P, D, A >

Definition at line 338 of file memory.h.

Constructor & Destructor Documentation

◆ ctrl_block_pda()

template<typename P , typename D , typename A >
CLHEP::sp::ctrl_block_pda< P, D, A >::ctrl_block_pda ( P *  p,
d,
a 
)
inline

Definition at line 362 of file memory.h.

364 , owned_ptr( p )
365 , deleter ( d )
366 , allocator( a )
367{ }

◆ ~ctrl_block_pda()

template<typename P , typename D , typename A >
CLHEP::sp::ctrl_block_pda< P, D, A >::~ctrl_block_pda
throw (
)
inline

Definition at line 370 of file memory.h.

371{ }

Member Function Documentation

◆ destroy()

template<typename P , typename D , typename A >
void CLHEP::sp::ctrl_block_pda< P, D, A >::destroy
throw (
)
inlinevirtual

Reimplemented from CLHEP::sp::abstract_ctrl_block.

Definition at line 382 of file memory.h.

383{
384 typename A::template rebind< this_type >::other this_allocator( allocator );
385
386 this_allocator.destroy( this ); // this->~this_type();
387 this_allocator.deallocate( this, 1 );
388}

◆ dispose()

template<typename P , typename D , typename A >
void CLHEP::sp::ctrl_block_pda< P, D, A >::dispose
throw (
)
inlinevirtual

Implements CLHEP::sp::abstract_ctrl_block.

Definition at line 375 of file memory.h.

376{
377 deleter( owned_ptr );
378}

◆ get_deleter()

template<typename P , typename D , typename A >
void * CLHEP::sp::ctrl_block_pda< P, D, A >::get_deleter ( std::type_info const ti)
inlinevirtual

Implements CLHEP::sp::abstract_ctrl_block.

Definition at line 392 of file memory.h.

393{
394 return ti == typeid( D ) ? &reinterpret_cast<char&>( deleter ) : 0;
395}

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