Bayeux
3.4.1
Core Foundation library for SuperNEMO
bayeux
datatools
configuration
array_occurrence.h
Go to the documentation of this file.
1
/* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3
* Creation date : 2014-05-11
4
* Last modified : 2014-08-10
5
*
6
* Copyright (C) 2014 Francois Mauger <mauger@lpccaen.in2p3.fr>
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 3 of the License, or (at
11
* your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301, USA.
22
*
23
* Description:
24
*
25
* Some utilities for the description of configuration variants and parameters.
26
*
27
*/
28
29
#ifndef DATATOOLS_CONFIGURATION_ARRAY_OCCURRENCE_H
30
#define DATATOOLS_CONFIGURATION_ARRAY_OCCURRENCE_H
31
32
// This project (Bayeux/datatools):
33
#include <
datatools/configuration/i_occurrence.h
>
34
35
namespace
datatools
{
36
37
namespace
configuration {
38
40
class
array_occurrence
41
:
public
i_occurrence
42
{
43
public
:
44
46
void
set_size
(
unsigned
int
sz_);
47
49
unsigned
int
get_size
()
const
;
50
52
void
set_start_id
(
int
sid_);
53
55
int
get_start_id
()
const
;
56
58
array_occurrence
();
59
61
virtual
~array_occurrence
();
62
64
virtual
size_t
get_dimension
()
const
;
65
67
virtual
size_t
get_number_of_occurrences
()
const
;
68
70
virtual
void
compute_occurrence
(
int
rank_,
single_occurrence
& occ_)
const
;
71
73
virtual
size_t
compute_index_path
(std::vector<uint32_t> & path_,
int
rank_)
const
;
74
76
virtual
std::string
to_string
()
const
;
77
78
private
:
79
80
unsigned
int
_size_;
81
int
_start_id_;
82
83
};
84
85
}
// end of namespace configuration
86
87
}
// end of namespace datatools
88
89
#endif // DATATOOLS_CONFIGURATION_ARRAY_OCCURRENCE_H
90
91
// Local Variables: --
92
// mode: c++ --
93
// c-file-style: "gnu" --
94
// tab-width: 2 --
95
// End: --
datatools::configuration::array_occurrence::compute_index_path
virtual size_t compute_index_path(std::vector< uint32_t > &path_, int rank_) const
Compute a multidimensional index path from a rank.
datatools::configuration::array_occurrence
Single occurrence.
Definition:
array_occurrence.h:40
datatools::configuration::array_occurrence::get_number_of_occurrences
virtual size_t get_number_of_occurrences() const
Return the number of occurrences.
datatools::configuration::array_occurrence::get_dimension
virtual size_t get_dimension() const
Return the dimension.
datatools::configuration::array_occurrence::get_start_id
int get_start_id() const
Get the starting id.
datatools::configuration::array_occurrence::set_size
void set_size(unsigned int sz_)
Set the size of the array.
datatools::configuration::array_occurrence::get_size
unsigned int get_size() const
Return the size of the array.
datatools::configuration::array_occurrence::compute_occurrence
virtual void compute_occurrence(int rank_, single_occurrence &occ_) const
Compute the occurrence associated to a given rank.
datatools::configuration::single_occurrence
Single occurrence for a physical parameter in a variant model.
Definition:
single_occurrence.h:47
datatools::configuration::array_occurrence::set_start_id
void set_start_id(int sid_)
Set the starting id.
datatools
The Bayeux/datatools library top-level namespace.
Definition:
algo.h:13
datatools::configuration::i_occurrence
Abstract interface for all occurrence objects.
Definition:
i_occurrence.h:48
datatools::configuration::array_occurrence::array_occurrence
array_occurrence()
Constructor.
i_occurrence.h
datatools::configuration::array_occurrence::~array_occurrence
virtual ~array_occurrence()
Destructor.
datatools::configuration::array_occurrence::to_string
virtual std::string to_string() const
Convert to a string.
Generated by
1.8.15