add operator << for Set

This commit is contained in:
HRN 2025-02-15 22:03:41 +03:30
parent fd6b3ebc60
commit 2a8146c43f
2 changed files with 19 additions and 0 deletions

View File

@ -24,6 +24,7 @@ Licence:
#include <set>
#include "types.hpp"
#include "iOstream.hpp"
namespace pFlow
{
@ -34,6 +35,20 @@ using Set = std::set<Key,std::less<Key>,std::allocator<Key>>;
using wordSet = Set<word>;
template<typename key>
iOstream& operator<<(iOstream& os, const Set<key>& s)
{
os << beginListToken();
for(auto elm = s.begin(); elm!=s.end(); )
{
os<< *elm++;
if( elm!=s.end() )
os<<spaceToken();
}
os<< endListToken();
os.check(FUNCTION_NAME);
return os;
}
}

View File

@ -36,6 +36,8 @@ bool pFlow::systemControl::readIncludeExclue(const dictionary& dict)
}
}
REPORT(1)<<"IncludeObject list is: "<<Green_Text(includeList_)<<END_REPORT;
if (dict.containsDataEntry("excludeObjects"))
{
wordList excld = dict.getVal<wordList>("excludeObjects");
@ -44,6 +46,8 @@ bool pFlow::systemControl::readIncludeExclue(const dictionary& dict)
excludeList_.insert(nm);
}
}
REPORT(1)<<"excludeObject list is: "<<Green_Text(excludeList_)<<END_REPORT;
return true;
}