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

#include <memory.h>

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

Public Member Functions

 ctrl_block_pd (P *, D)
 
 ~ctrl_block_pd () throw ()
 
void * operator new (std::size_t)
 
void operator delete (void *)
 
virtual void * get_deleter (std::type_info const &)
 
virtual void dispose () 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>
class CLHEP::sp::ctrl_block_pd< P, D >

Definition at line 270 of file memory.h.

Constructor & Destructor Documentation

◆ ctrl_block_pd()

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

Definition at line 296 of file memory.h.

298 , owned_ptr( p )
299 , deleter ( d )
300{ }

◆ ~ctrl_block_pd()

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

Definition at line 303 of file memory.h.

304{ }

Member Function Documentation

◆ dispose()

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

Implements CLHEP::sp::abstract_ctrl_block.

Definition at line 308 of file memory.h.

309{
310 deleter( owned_ptr );
311}

◆ get_deleter()

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

Implements CLHEP::sp::abstract_ctrl_block.

Definition at line 315 of file memory.h.

316{
317 return ti == typeid(D) ? &reinterpret_cast<char&>( deleter ) : 0;
318}

◆ operator delete()

template<typename P , typename D >
void CLHEP::sp::ctrl_block_pd< P, D >::operator delete ( void *  p)
inline

Definition at line 329 of file memory.h.

330{
331 std::allocator<this_type>().deallocate( static_cast<this_type*>(p), 1 );
332}

◆ operator new()

template<typename P , typename D >
void * CLHEP::sp::ctrl_block_pd< P, D >::operator new ( std::size_t  )
inline

Definition at line 322 of file memory.h.

323{
324 return std::allocator<this_type>().allocate( 1 );
325}

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