Added Merchant config files and parsing of config files to merchant structure.
This commit is contained in:
@@ -130,12 +130,12 @@ namespace olc::utils
|
||||
return m_vContent.size();
|
||||
}
|
||||
|
||||
inline std::vector<std::string> GetValues() const
|
||||
inline const std::vector<std::string>&GetValues()
|
||||
{
|
||||
return m_vContent;
|
||||
}
|
||||
|
||||
inline std::unordered_map<std::string,size_t> GetKeys() const{
|
||||
inline const std::unordered_map<std::string,size_t>&GetKeys(){
|
||||
return m_mapObjects;
|
||||
}
|
||||
|
||||
@@ -458,6 +458,13 @@ namespace olc::utils
|
||||
return m_vecObjects[m_mapObjects[name]].second;
|
||||
}
|
||||
|
||||
inline auto begin(){
|
||||
return GetKeys().begin();
|
||||
}
|
||||
inline auto end(){
|
||||
return GetKeys().end();
|
||||
}
|
||||
|
||||
private:
|
||||
// The "list of strings" that make up a property value
|
||||
std::vector<std::string> m_vContent;
|
||||
@@ -484,7 +491,7 @@ namespace olc::utils
|
||||
std::string operator[](int index){return data.get().GetProperty(key).GetString(index);};
|
||||
inline std::string concat(){
|
||||
std::string finalStr="";
|
||||
for(std::string&str:data.get().GetProperty(key).GetValues()){
|
||||
for(const std::string&str:data.get().GetProperty(key).GetValues()){
|
||||
if(finalStr.length()>0)finalStr+=", ";
|
||||
finalStr+=str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user