#include <particletype.h>
A pointer-like interface to global references to ParticleType objects. 
- See also
 - ParticleType::operator& 
 
Definition at line 671 of file particletype.h.
 
◆ ParticleTypePtr() [1/2]
  
  
      
        
          | smash::ParticleTypePtr::ParticleTypePtr  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
default   | 
  
 
Default construction initializes with an invalid index. 
 
 
◆ ParticleTypePtr() [2/2]
  
  
      
        
          | smash::ParticleTypePtr::ParticleTypePtr  | 
          ( | 
          std::uint16_t  | 
          i | ) | 
           | 
         
       
   | 
  
inlineexplicitprivate   | 
  
 
Constructs a pointer to the ParticleType object at offset i. 
- Parameters
 - 
  
    | [in] | i | the offset where to create.  | 
  
   
Definition at line 726 of file particletype.h.
std::uint16_t index_
Stores the index of the references ParticleType object in the global vector.
 
 
 
 
◆ operator*()
  
  
      
        
          | const ParticleType& smash::ParticleTypePtr::operator*  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
- Returns
 - Dereferences the pointer and returns the ParticleType object. 
 
Definition at line 674 of file particletype.h.
const ParticleType & lookup() const
Helper function that does the ParticleType lookup from the stored index.
 
 
 
 
◆ operator->()
  
  
      
        
          | const ParticleType* smash::ParticleTypePtr::operator->  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ operator==()
  
  
      
        
          | bool smash::ParticleTypePtr::operator==  | 
          ( | 
          const ParticleTypePtr &  | 
          rhs | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ operator!=()
  
  
      
        
          | bool smash::ParticleTypePtr::operator!=  | 
          ( | 
          const ParticleTypePtr &  | 
          rhs | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ operator<()
  
  
      
        
          | bool smash::ParticleTypePtr::operator<  | 
          ( | 
          const ParticleTypePtr &  | 
          rhs | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
"Less than" operator 
- Parameters
 - 
  
  
 
- Returns
 - whether the index is smaller than rhs' index. 
 
Definition at line 707 of file particletype.h.
  708     return index_ < rhs.index_;
 
 
 
 
◆ operator bool()
  
  
      
        
          | smash::ParticleTypePtr::operator bool  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ lookup()
  
  
      
        
          | const ParticleType& smash::ParticleTypePtr::lookup  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineprivate   | 
  
 
Helper function that does the ParticleType lookup from the stored index. 
- Implementation:
 - In debug builds this function asserts that the index is valid. It then asks for the vector of all ParticleType objects (ParticleType::list_all) and uses vector::operator[] to return an lvalue reference to the ParticleType object at the offset 
index_. 
- Returns
 - a reference to the ParticleType object at offset 
index_.  
Definition at line 739 of file particletype.h.
static const ParticleTypeList & list_all()
 
 
 
 
◆ ParticleType::operator&
◆ index_
  
  
      
        
          | std::uint16_t smash::ParticleTypePtr::index_ = 0xffff | 
         
       
   | 
  
private   | 
  
 
Stores the index of the references ParticleType object in the global vector. 
The value 0xffff is used to denote an invalid index (similar to a null pointer). 
Definition at line 749 of file particletype.h.
 
 
The documentation for this class was generated from the following file: