CBuild
C++ build system with scripts written in c++
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
lib::mapData< _K, _D > Class Template Reference

Simple pair of values, have "==" operator implemented. More...

#include <map.hpp>

Public Member Functions

 mapData ()
 Construct a new map data object,
! Key and data variables is not initialize and contains garbage.
 
 mapData (_K key, _D data)
 Construct a new map data object.
 
bool operator== (lib::mapData< _K, _D > val)
 If ((this.key == val.key) && (this.data == val.data))
 

Public Attributes

_K key
 
_D data
 

Detailed Description

template<class _K, class _D>
class lib::mapData< _K, _D >

Simple pair of values, have "==" operator implemented.

Template Parameters
_K-> Key, if this will be added to map need to have "==" operator implemented
_D-> Value
All types must implement "=" operator
All types must implement "==" operator

Definition at line 38 of file map.hpp.

Constructor & Destructor Documentation

◆ mapData() [1/2]

template<class _K , class _D >
lib::mapData< _K, _D >::mapData ( )
inline

Construct a new map data object,
! Key and data variables is not initialize and contains garbage.

Definition at line 48 of file map.hpp.

◆ mapData() [2/2]

template<class _K , class _D >
lib::mapData< _K, _D >::mapData ( _K key,
_D data )
inline

Construct a new map data object.

Parameters
key=> _K -> Key
data=> _D -> Value

Definition at line 55 of file map.hpp.

References lib::mapData< _K, _D >::data, and lib::mapData< _K, _D >::key.

Member Function Documentation

◆ operator==()

template<class _K , class _D >
bool lib::mapData< _K, _D >::operator== ( lib::mapData< _K, _D > val)
inline

If ((this.key == val.key) && (this.data == val.data))

Parameters
val=> lib::mapData<_K, _D> -> Another mapData
Returns
true -> Two object is equals
false -> Two object is different

Definition at line 65 of file map.hpp.

References lib::mapData< _K, _D >::data, and lib::mapData< _K, _D >::key.

Member Data Documentation

◆ data

template<class _K , class _D >
_D lib::mapData< _K, _D >::data

◆ key

template<class _K , class _D >
_K lib::mapData< _K, _D >::key

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