Ignore:
Timestamp:
07/26/22 15:26:52 (2 years ago)
Author:
jderouillat
Message:

Set the code structure to compute the hash value of an element based on its attributs, use for now before writing an element in a file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/attribute_template_impl.hpp

    r2305 r2386  
    168168      if (!this->isEmpty() && !attr.isEmpty())  return (this->getValue() == attr.getValue()); 
    169169      else return false; 
     170    } 
     171 
     172    template <class T> 
     173    int CAttributeTemplate<T>::computeHash(void) 
     174    { 
     175      // Basic hash computation through string 
     176      return std::hash<string>{}( toString() ); 
    170177    } 
    171178 
Note: See TracChangeset for help on using the changeset viewer.