KADATH
Kadath::Param Class Reference

Parameter storage. More...

#include <param.hpp>

Public Member Functions

 Param ()
 Default constructor is the only constructor. More...
 
 ~Param ()
 Destructor. More...
 
int get_n_int () const
 Returns the number of stored int 's addresses. More...
 
void add_int (int n, int position=0)
 Adds the address of a new int to the list. More...
 
const int & get_int (int position=0) const
 Returns the reference of a int stored in the list. More...
 
int get_n_int_mod () const
 Returns the number of modifiable int 's addresses in the list. More...
 
int get_n_double () const
 Returns the number of stored double 's addresses. More...
 
void add_double (double x, int position=0)
 Adds the the address of a new double to the list. More...
 
const double & get_double (int position=0) const
 Returns the reference of a double stored in the list. More...
 

Private Member Functions

 Param (const Param &)
 Copy constructor (private and not implemented to make Param a non-copyable class) More...
 
void operator= (const Param &)
 Assignment operator (private and not implemented to make Param a non-copyable class) More...
 

Private Attributes

int n_int
 Number of int 's (integers). More...
 
int * p_int
 Array (size n_int ) of the int 's addresses. More...
 
int n_double
 Number of double 's (double precis. More...
 
double * p_double
 Array (size n_double ) of the double 's addresses. More...
 

Detailed Description

Parameter storage.

This class is intended to store addresses of various Kadath objects to pass them as parameters in some subroutines.

Definition at line 30 of file param.hpp.

Constructor & Destructor Documentation

◆ Param() [1/2]

Kadath::Param::Param ( )

Default constructor is the only constructor.

Definition at line 30 of file param.cpp.

◆ Param() [2/2]

Kadath::Param::Param ( const Param )
private

Copy constructor (private and not implemented to make Param a non-copyable class)

◆ ~Param()

Kadath::Param::~Param ( )

Destructor.

Definition at line 39 of file param.cpp.

References n_double, n_int, p_double, and p_int.

Member Function Documentation

◆ add_double()

void Kadath::Param::add_double ( double  x,
int  position = 0 
)

Adds the the address of a new double to the list.

Parameters
x[input] double the address of which is to be stored
position[input] position of the double in the list of stored double addresses (default value = 0)

Definition at line 115 of file param.cpp.

References n_double, and p_double.

◆ add_int()

void Kadath::Param::add_int ( int  n,
int  position = 0 
)

Adds the address of a new int to the list.

Parameters
n[input] int the address of which is to be stored
position[input] position of the int in the list of stored int addresses (default value = 0)

Definition at line 60 of file param.cpp.

References n_int, and p_int.

◆ get_double()

const double & Kadath::Param::get_double ( int  position = 0) const

Returns the reference of a double stored in the list.

Parameters
position[input] position of the double in the list of stored double addresses (default value = 0)
Returns
Reference to the double the address of which is stored at the location position in the list

Definition at line 148 of file param.cpp.

References n_double, and p_double.

◆ get_int()

const int & Kadath::Param::get_int ( int  position = 0) const

Returns the reference of a int stored in the list.

Parameters
position[input] position of the int in the list of stored int addresses (default value = 0)
Returns
Reference to the int the address of which is stored at the location position in the list

Definition at line 92 of file param.cpp.

References n_int, and p_int.

◆ get_n_double()

int Kadath::Param::get_n_double ( ) const

Returns the number of stored double 's addresses.

Definition at line 108 of file param.cpp.

References n_double.

◆ get_n_int()

int Kadath::Param::get_n_int ( ) const

Returns the number of stored int 's addresses.

Definition at line 53 of file param.cpp.

References n_int.

◆ get_n_int_mod()

int Kadath::Param::get_n_int_mod ( ) const

Returns the number of modifiable int 's addresses in the list.

◆ operator=()

void Kadath::Param::operator= ( const Param )
private

Assignment operator (private and not implemented to make Param a non-copyable class)

Member Data Documentation

◆ n_double

int Kadath::Param::n_double
private

Number of double 's (double precis.

numbers).

Definition at line 39 of file param.hpp.

◆ n_int

int Kadath::Param::n_int
private

Number of int 's (integers).


Definition at line 35 of file param.hpp.

◆ p_double

double* Kadath::Param::p_double
private

Array (size n_double ) of the double 's addresses.

Definition at line 41 of file param.hpp.

◆ p_int

int* Kadath::Param::p_int
private

Array (size n_int ) of the int 's addresses.

Definition at line 37 of file param.hpp.


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