The CyMeAlg Software (Release 0.01)
dummyarr.h
Go to the documentation of this file.
1 /// @addtogroup cymealg
2 /// @{
3 
4 /////////////////////////////////////////////////////////////////////////////
5 ///
6 /// @file
7 ///
8 /// This header file contains the definition of a dummy array.
9 ///
10 /// @author Pawel Pilarczyk
11 ///
12 /////////////////////////////////////////////////////////////////////////////
13 
14 // Copyright (C) 1997-2020 by Pawel Pilarczyk.
15 //
16 // This file is part of my research software. This is free software:
17 // you can redistribute it and/or modify it under the terms of the GNU
18 // General Public License as published by the Free Software Foundation,
19 // either version 3 of the License, or (at your option) any later version.
20 //
21 // This software is distributed in the hope that it will be useful,
22 // but WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 // GNU General Public License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // along with this software; see the file "license.txt". If not,
28 // please, see <http://www.gnu.org/licenses/>.
29 
30 // Started in January 2006. Last revision: August 23, 2019.
31 
32 
33 #ifndef _CYMEALG_DUMMYARR_H_
34 #define _CYMEALG_DUMMYARR_H_
35 
36 // include selected CHomP header files
37 #include "chomp/system/config.h"
38 
39 namespace cymealg {
40 
41 // --------------------------------------------------
42 // ------------------ DUMMY ARRAY -------------------
43 // --------------------------------------------------
44 
45 /// A dummy array of integers that ignores all the assigned values.
47 {
48 public:
49  /// The constructor of a dummy array.
50  dummyArray () {n = 0;}
51 
52  /// Operator [] which returns a reference to a dummy value.
53  int_t &operator [] (int_t) {return n;}
54 
55 private:
56  /// A dummy number used as a dump box for assigning values.
57  int_t n;
58 
59 }; /* class dummyArray */
60 
61 
62 } // namespace cymealg
63 
64 #endif // _CYMEALG_DUMMYARR_H_
65 
66 /// @}
67 
dummyArray()
The constructor of a dummy array.
Definition: dummyarr.h:50
int_t & operator[](int_t)
Operator [] which returns a reference to a dummy value.
Definition: dummyarr.h:53
A dummy array of integers that ignores all the assigned values.
Definition: dummyarr.h:46
int_t n
A dummy number used as a dump box for assigning values.
Definition: dummyarr.h:57