Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Static Public Attributes | List of all members
datatools::configuration::i_occurrence Class Referenceabstract

Abstract interface for all occurrence objects. More...

#include <bayeux/datatools/configuration/i_occurrence.h>

Inheritance diagram for datatools::configuration::i_occurrence:
datatools::configuration::array_occurrence datatools::configuration::single_occurrence

Public Member Functions

 i_occurrence ()
 Constructor. More...
 
virtual ~i_occurrence ()
 Destructor. More...
 
virtual size_t get_dimension () const =0
 Return the dimension. More...
 
virtual size_t get_number_of_occurrences () const =0
 Return the number of occurrences. More...
 
virtual void compute_occurrence (int rank_, single_occurrence &occ_) const =0
 Compute the occurrence associated to a given rank. More...
 
bool is_multiple () const
 Check if occurrence is multiple. More...
 
single_occurrence get_occurrence_by_rank (int rank_) const
 Compute the occurrence associated to a given rank. More...
 
virtual size_t compute_index_path (std::vector< uint32_t > &path_, int rank_) const =0
 Compute a multidimensional index path from a rank. More...
 
virtual std::string to_string () const =0
 Convert to a string. More...
 

Static Public Attributes

static const int INVALID_ID = -2
 
static const int SINGLE_ID = -1
 

Detailed Description

Abstract interface for all occurrence objects.

Constructor & Destructor Documentation

◆ i_occurrence()

datatools::configuration::i_occurrence::i_occurrence ( )

Constructor.

◆ ~i_occurrence()

virtual datatools::configuration::i_occurrence::~i_occurrence ( )
virtual

Destructor.

Member Function Documentation

◆ compute_index_path()

virtual size_t datatools::configuration::i_occurrence::compute_index_path ( std::vector< uint32_t > &  path_,
int  rank_ 
) const
pure virtual

Compute a multidimensional index path from a rank.

Implemented in datatools::configuration::array_occurrence, and datatools::configuration::single_occurrence.

◆ compute_occurrence()

virtual void datatools::configuration::i_occurrence::compute_occurrence ( int  rank_,
single_occurrence occ_ 
) const
pure virtual

Compute the occurrence associated to a given rank.

Implemented in datatools::configuration::array_occurrence, and datatools::configuration::single_occurrence.

◆ get_dimension()

virtual size_t datatools::configuration::i_occurrence::get_dimension ( ) const
pure virtual

◆ get_number_of_occurrences()

virtual size_t datatools::configuration::i_occurrence::get_number_of_occurrences ( ) const
pure virtual

Return the number of occurrences.

Implemented in datatools::configuration::array_occurrence, and datatools::configuration::single_occurrence.

◆ get_occurrence_by_rank()

single_occurrence datatools::configuration::i_occurrence::get_occurrence_by_rank ( int  rank_) const

Compute the occurrence associated to a given rank.

◆ is_multiple()

bool datatools::configuration::i_occurrence::is_multiple ( ) const

Check if occurrence is multiple.

◆ to_string()

virtual std::string datatools::configuration::i_occurrence::to_string ( ) const
pure virtual

Member Data Documentation

◆ INVALID_ID

const int datatools::configuration::i_occurrence::INVALID_ID = -2
static

◆ SINGLE_ID

const int datatools::configuration::i_occurrence::SINGLE_ID = -1
static

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