Skip to content

Commit 3a31f32

Browse files
committed
Added DomOrdPWMap factories
1 parent 98d5b20 commit 3a31f32

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

sbg/pwmap_fact.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,32 @@ std::string OrdPWMapFact::prettyPrint() const
8383
return "ordered";
8484
}
8585

86+
////////////////////////////////////////////////////////////////////////////////
87+
// DomOrdPWMap Factory ------------------------------------------------------------
88+
////////////////////////////////////////////////////////////////////////////////
89+
90+
DomOrdPWMapFact::DomOrdPWMapFact() {}
91+
92+
PWMap DomOrdPWMapFact::createPWMap() const
93+
{
94+
return PWMap(std::make_unique<DomOrdPWMap>());
95+
}
96+
97+
PWMap DomOrdPWMapFact::createPWMap(const Set &s) const
98+
{
99+
return PWMap(std::make_unique<DomOrdPWMap>(s));
100+
}
101+
102+
PWMap DomOrdPWMapFact::createPWMap(const Map &m) const
103+
{
104+
return PWMap(std::make_unique<DomOrdPWMap>(m));
105+
}
106+
107+
std::string DomOrdPWMapFact::prettyPrint() const
108+
{
109+
return "domain ordered";
110+
}
111+
86112
////////////////////////////////////////////////////////////////////////////////
87113
// Factory for clients ---------------------------------------------------------
88114
////////////////////////////////////////////////////////////////////////////////

sbg/pwmap_fact.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ struct OrdPWMapFact : public PWMapFact {
6363
std::string prettyPrint() const override;
6464
};
6565

66+
struct DomOrdPWMapFact : public PWMapFact {
67+
public:
68+
DomOrdPWMapFact();
69+
70+
PWMap createPWMap() const override;
71+
PWMap createPWMap(const Set &s) const override;
72+
PWMap createPWMap(const Map &m) const override;
73+
std::string prettyPrint() const override;
74+
};
75+
6676
using PWMapFactPtr = std::unique_ptr<PWMapFact>;
6777

6878
/**

0 commit comments

Comments
 (0)