C++ mpi module for stochmagnet_main Package
Public Member Functions | Protected Member Functions | List of all members
CORE_Collection< T, I > Class Template Reference

this class describes a general container of values of type T where implemented class is I More...

#include <CORE_Collection.h>

Inheritance diagram for CORE_Collection< T, I >:
Inheritance graph
[legend]
Collaboration diagram for CORE_Collection< T, I >:
Collaboration graph
[legend]

Public Member Functions

virtual tMemSize getMemorySize () const override
 return the memory size of the class and the memory size of all its attributes/associations More...
 
void setSize (const tIndex &n)
 set the size of the container More...
 
tIndex getSize () const
 return the size of the container More...
 
void resize (const tIndex &n)
 modify the size of the array and keep its old values
 
const T & operator[] (const tIndex &i) const
 get the i-th element for reading. Do not verify the bounds More...
 
T & operator[] (const tIndex &i)
 get the i-th element for writting. Do not verify the bounds More...
 
constexpr auto cbegin () const
 return begin iterator for reading More...
 
constexpr auto cend () const
 return end iterator for reading More...
 
auto begin ()
 return begin iterator for writing More...
 
auto end ()
 return end iterator for writing More...
 
auto rbegin ()
 return reverse begin iterator for writing More...
 
auto rend ()
 return reverse end iterator for writing More...
 
constexpr auto crbegin () const
 return reverse begin iterator for reading More...
 
constexpr auto crend () const
 return reverse end iterator for reading More...
 
template<typename LambdaFct >
void transform (LambdaFct &&F)
 transform the transform element with the lambda function Ti = F(Ti) More...
 
tString getDataTypeName () const
 get the type of data More...
 
virtual tString toString () const override
 return the string representation of the object node More...
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
virtual tMemSize getContentsMemorySize () const
 return nthe memory size of the included associations More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 

Protected Member Functions

 CORE_Collection ()
 build an array of T*
 
virtual ~CORE_Collection ()
 destroy an array of T*
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Additional Inherited Members

- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Detailed Description

template<typename T, class I>
class CORE_Collection< T, I >

this class describes a general container of values of type T where implemented class is I

Class I must implement the folowing static polymorphic methods:

Member Function Documentation

◆ begin()

template<typename T , class I >
auto CORE_Collection< T, I >::begin ( )
inline

return begin iterator for writing

Returns
begin iterator

◆ cbegin()

template<typename T , class I >
constexpr auto CORE_Collection< T, I >::cbegin ( ) const
inlineconstexpr

return begin iterator for reading

Returns
begin iterator

◆ cend()

template<typename T , class I >
constexpr auto CORE_Collection< T, I >::cend ( ) const
inlineconstexpr

return end iterator for reading

Returns
end iterator

◆ crbegin()

template<typename T , class I >
constexpr auto CORE_Collection< T, I >::crbegin ( ) const
inlineconstexpr

return reverse begin iterator for reading

Returns
begin iterator

◆ crend()

template<typename T , class I >
constexpr auto CORE_Collection< T, I >::crend ( ) const
inlineconstexpr

return reverse end iterator for reading

Returns
end iterator

◆ end()

template<typename T , class I >
auto CORE_Collection< T, I >::end ( )
inline

return end iterator for writing

Returns
end iterator

◆ getDataTypeName()

template<typename T , class I >
tString CORE_Collection< T, I >::getDataTypeName ( ) const
inline

get the type of data

Returns
the type of data as string

◆ getMemorySize()

template<typename T , class I >
virtual tMemSize CORE_Collection< T, I >::getMemorySize ( ) const
inlineoverridevirtual

◆ getSize()

template<typename T , class I >
tIndex CORE_Collection< T, I >::getSize ( ) const
inline

return the size of the container

Returns
the size container

◆ operator[]() [1/2]

template<typename T , class I >
T& CORE_Collection< T, I >::operator[] ( const tIndex &  i)
inline

get the i-th element for writting. Do not verify the bounds

Parameters
[in]iindex of the element

◆ operator[]() [2/2]

template<typename T , class I >
const T& CORE_Collection< T, I >::operator[] ( const tIndex &  i) const
inline

get the i-th element for reading. Do not verify the bounds

Parameters
[in]iindex of the element

◆ rbegin()

template<typename T , class I >
auto CORE_Collection< T, I >::rbegin ( )
inline

return reverse begin iterator for writing

Returns
begin iterator

◆ rend()

template<typename T , class I >
auto CORE_Collection< T, I >::rend ( )
inline

return reverse end iterator for writing

Returns
end iterator

◆ setSize()

template<typename T , class I >
void CORE_Collection< T, I >::setSize ( const tIndex &  n)
inline

set the size of the container

Parameters
[in]n:size of the container

◆ toString()

template<typename T , class I >
virtual tString CORE_Collection< T, I >::toString ( ) const
inlineoverridevirtual

◆ transform()

template<typename T , class I >
template<typename LambdaFct >
void CORE_Collection< T, I >::transform ( LambdaFct &&  F)
inline

transform the transform element with the lambda function Ti = F(Ti)

Parameters
[in]F: lambda function with one variable

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