KADATH
Kadath::Dim_array Class Reference

Class for storing the dimensions of an array. More...

#include <dim_array.hpp>

Inheritance diagram for Kadath::Dim_array:

Public Types

using Data_type = Memory_mapped_array< int >
 Sylvain's stuff. More...
 
using size_type = int
 Sylvain's stuff. More...
 

Public Member Functions

 Dim_array (int dim)
 Standard constructor. More...
 
 Dim_array (const Dim_array &so)
 Copy constructor. More...
 
 Dim_array (FILE *)
 Constructor from a file (previously generated by the save member) More...
 
int & set (int i)
 Read/write of the size of a given dimension. More...
 
int operator() (int i) const
 Read only of the size of a given dimension. More...
 
int get_ndim () const
 Returns the number of dimensions. More...
 
void operator= (const Dim_array &so)
 Assignement to annother Dim_array. More...
 
void swap (Dim_array &so)
 Sylvain's stuff. More...
 
void save (FILE *) const
 Save function. More...
 
 Dim_array (Dim_array &&so)
 Move constructor. More...
 
Dim_arrayoperator= (Dim_array &&so)
 Operator =. More...
 

Detailed Description

Class for storing the dimensions of an array.

It simply consists of a list of integers, being the size of a given Array, in each dimension.

Definition at line 34 of file dim_array.hpp.

Member Typedef Documentation

◆ Data_type

using Kadath::Dim_array::Data_type = Memory_mapped_array<int>

Sylvain's stuff.

Definition at line 37 of file dim_array.hpp.

◆ size_type

Sylvain's stuff.

Definition at line 39 of file dim_array.hpp.

Constructor & Destructor Documentation

◆ Dim_array() [1/4]

Kadath::Dim_array::Dim_array ( int  dim)
inlineexplicit

Standard constructor.

Parameters
dim[input] number of dimensions. The sizes are not initialized.

Definition at line 43 of file dim_array.hpp.

◆ Dim_array() [2/4]

Kadath::Dim_array::Dim_array ( const Dim_array so)
inline

Copy constructor.

Parameters
so[input] the input Dim_array

Definition at line 47 of file dim_array.hpp.

◆ Dim_array() [3/4]

Kadath::Dim_array::Dim_array ( FILE *  fd)

Constructor from a file (previously generated by the save member)

Definition at line 24 of file dim_array.cpp.

◆ Dim_array() [4/4]

Kadath::Dim_array::Dim_array ( Dim_array &&  so)
inline

Move constructor.

Definition at line 73 of file dim_array.hpp.

Member Function Documentation

◆ get_ndim()

int Kadath::Dim_array::get_ndim ( ) const
inline

Returns the number of dimensions.

Definition at line 63 of file dim_array.hpp.

◆ operator()()

int Kadath::Dim_array::operator() ( int  i) const
inline

Read only of the size of a given dimension.

Parameters
i[input] dimension.

Definition at line 59 of file dim_array.hpp.

◆ operator=() [1/2]

void Kadath::Dim_array::operator= ( const Dim_array so)
inline

Assignement to annother Dim_array.

Definition at line 67 of file dim_array.hpp.

◆ operator=() [2/2]

Dim_array& Kadath::Dim_array::operator= ( Dim_array &&  so)
inline

Operator =.

Definition at line 75 of file dim_array.hpp.

◆ save()

void Kadath::Dim_array::save ( FILE *  fd) const

Save function.

Definition at line 32 of file dim_array.cpp.

◆ set()

int& Kadath::Dim_array::set ( int  i)
inline

Read/write of the size of a given dimension.

Parameters
i[input] dimension.

Definition at line 54 of file dim_array.hpp.

◆ swap()

void Kadath::Dim_array::swap ( Dim_array so)
inline

Sylvain's stuff.

Definition at line 70 of file dim_array.hpp.


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