add operator << for Set
This commit is contained in:
parent
fd6b3ebc60
commit
2a8146c43f
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ bool pFlow::systemControl::readIncludeExclue(const dictionary& dict)
|
|||
includeList_.insert(nm);
|
||||
}
|
||||
}
|
||||
|
||||
REPORT(1)<<"IncludeObject list is: "<<Green_Text(includeList_)<<END_REPORT;
|
||||
|
||||
if (dict.containsDataEntry("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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue