diff --git a/efel/cppcore/cfeature.cpp b/efel/cppcore/cfeature.cpp index 288777cc..5c449861 100644 --- a/efel/cppcore/cfeature.cpp +++ b/efel/cppcore/cfeature.cpp @@ -57,6 +57,23 @@ cFeature::cFeature(const string& strDepFile, const string& outdir) logger << "Using dependency file: " << strDepFile << endl; } +template +const vector cFeature::getMapData(const string& strName, const map>& mapData) { + auto mapItr = mapData.find(strName); + if (mapItr == mapData.end()) { + return vector{}; // Return an empty vector without modifying the map + } + return mapItr->second; +} + +const vector cFeature::getmapIntData(string strName) { + return getMapData(strName, mapIntData); +} + +const vector cFeature::getmapDoubleData(string strName) { + return getMapData(strName, mapDoubleData); +} + int cFeature::setVersion(string strDepFile) { FptrTable.clear(); /* diff --git a/efel/cppcore/cfeature.h b/efel/cppcore/cfeature.h index 39d1ce0c..2bffbfdb 100644 --- a/efel/cppcore/cfeature.h +++ b/efel/cppcore/cfeature.h @@ -44,27 +44,13 @@ class cFeature { public: std::map > fptrlookup; - - template - const vector getMapData(const string& strName, const map>& mapData) { - auto mapItr = mapData.find(strName); - if (mapItr == mapData.end()) { - return vector{}; // Return an empty vector without modifying the map - } - return mapItr->second; - } - - const vector getmapIntData(string strName) { - return getMapData(strName, mapIntData); - } - - const vector getmapDoubleData(string strName) { - return getMapData(strName, mapDoubleData); - } - eFELLogger logger; cFeature(const string& depFile, const string& outdir); + template + const vector getMapData(const string& strName, const map>& mapData); + const vector getmapIntData(string strName); + const vector getmapDoubleData(string strName); int getmapfptrVec(string strName, vector& vFptr); int calc_features(const string& name); template