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

this class describes a list K -> T whre I is the implemented class More...

#include <CORE_List.h>

Inheritance diagram for CORE_List< T, K, I >:
Inheritance graph
[legend]
Collaboration diagram for CORE_List< T, K, 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...
 
virtual CORE_UniquePointer< CORE_List< T, K, I > > newInstance () const =0
 create a New instance within an unique smart pointer More...
 
const T & operator[] (const K &i) const
 get the i-th element for reading. Do not verify the bounds More...
 
T & operator[] (const K &i)
 get the i-th element for writting. Do not verify the bounds More...
 
tString getDataTypeName () const
 get the type of data More...
 
void sort ()
 sort the list in the incresing order
 
void directionalSort (const tUChar &order)
 sort the element More...
 
- Public Member Functions inherited from CORE_Collection< T, I >
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_List ()
 build an array of T*
 
virtual ~CORE_List ()
 destroy an array of T*
 
- Protected Member Functions inherited from CORE_Collection< T, I >
 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, typename K, class I>
class CORE_List< T, K, I >

this class describes a list K -> T whre I is the implemented class

Member Function Documentation

◆ directionalSort()

template<typename T , typename K , class I >
void CORE_List< T, K, I >::directionalSort ( const tUChar &  order)
inline

sort the element

Parameters
[in]order'i' or 'd'

◆ getDataTypeName()

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

get the type of data

Returns
the type of data as string

◆ getMemorySize()

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

return the memory size of the class and the memory size of all its attributes/associations

Returns
the memory size of the class and the memory size of its attributes/associations in bytes 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from CORE_Collection< T, I >.

Reimplemented in CORE_VectorList< T, I >, CORE_VectorList< tString, CORE_StringsList >, and CORE_StringsList.

◆ newInstance()

template<typename T , typename K , class I >
virtual CORE_UniquePointer<CORE_List<T,K,I> > CORE_List< T, K, I >::newInstance ( ) const
pure virtual

create a New instance within an unique smart pointer

Returns
an unqie pointer of this class

Implemented in CORE_StringsList.

◆ operator[]() [1/2]

template<typename T , typename K , class I >
T& CORE_List< T, K, I >::operator[] ( const K &  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 , typename K , class I >
const T& CORE_List< T, K, I >::operator[] ( const K &  i) const
inline

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

Parameters
[in]iindex of the element

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