GCBM
Public Member Functions | Private Attributes | List of all members
ErrorRecord Class Reference

#include <record.h>

Collaboration diagram for ErrorRecord:
Collaboration graph

Public Member Functions

 ErrorRecord (std::string module, std::string error)
 
 ~ErrorRecord ()
 
bool operator== (const ErrorRecord &other) const
 
size_t hash () const
 
ErrorRow asPersistable () const
 
StdErrorRow asTuple () const
 
void merge (const ErrorRecord &other)
 
void setId (Int64 id)
 
Int64 getId () const
 

Private Attributes

size_t _hash = -1
 
Int64 _id
 
std::string _module
 
std::string _error
 

Constructor & Destructor Documentation

◆ ErrorRecord()

ErrorRecord ( std::string  module,
std::string  error 
)

Constructor.

Initialise variables ErrorRecord._module as parameter module and ErrorRecord._error as parameter error.

Parameters
modulestring
errorstring

◆ ~ErrorRecord()

Member Function Documentation

◆ asPersistable()

ErrorRow asPersistable ( ) const

Return ErrorRow using ErrorRecord._id,ErrorRecord._module and ErrorRecord._error as parameters.

Returns
ErrorRow

◆ asTuple()

StdErrorRow asTuple ( ) const

Return StdErrorRow using ErrorRecord._id,ErrorRecord._module and ErrorRecord._error as parameters.

Returns
StdErrorRow

◆ getId()

Int64 getId ( ) const

◆ hash()

size_t hash ( ) const

If ErrorRecord._hash is equal to -1,
assign ErrorRecord._hash as moja::hash::hash_combine() using ErrorRecord._module and ErrorRecord._error.
return ErrorRecord._hash.

Returns
size_t

◆ merge()

void merge ( const ErrorRecord other)

◆ operator==()

bool operator== ( const ErrorRecord other) const

Check if ErrorRecord._module is equal parameter other ErrorRecord._module and ErrorRecord._error is equal to parameter other ErrorRecord._error.
return the boolean value.

Parameters
otherErrorRecord&
Returns
bool

◆ setId()

void setId ( Int64  id)

Member Data Documentation

◆ _error

std::string _error
private

◆ _hash

size_t _hash = -1
mutableprivate

◆ _id

Int64 _id
private

◆ _module

std::string _module
private

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