add operator << for Set
This commit is contained in:
parent
fd6b3ebc60
commit
2a8146c43f
|
@ -24,6 +24,7 @@ Licence:
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include "types.hpp"
|
#include "types.hpp"
|
||||||
|
#include "iOstream.hpp"
|
||||||
|
|
||||||
namespace pFlow
|
namespace pFlow
|
||||||
{
|
{
|
||||||
|
@ -34,6 +35,20 @@ using Set = std::set<Key,std::less<Key>,std::allocator<Key>>;
|
||||||
|
|
||||||
using wordSet = Set<word>;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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"))
|
if (dict.containsDataEntry("excludeObjects"))
|
||||||
{
|
{
|
||||||
wordList excld = dict.getVal<wordList>("excludeObjects");
|
wordList excld = dict.getVal<wordList>("excludeObjects");
|
||||||
|
@ -44,6 +46,8 @@ bool pFlow::systemControl::readIncludeExclue(const dictionary& dict)
|
||||||
excludeList_.insert(nm);
|
excludeList_.insert(nm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
REPORT(1)<<"excludeObject list is: "<<Green_Text(excludeList_)<<END_REPORT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue