SetFactory.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_SetFactory_h_
#define polybori_SetFactory_h_
// include basic definitions
#include <polybori/pbori_defs.h>
#include <polybori/factories/CFactoryBase.h>
#include <polybori/BooleSet.h>
#include <polybori/BooleMonomial.h>
BEGIN_NAMESPACE_PBORI
class SetFactory:
public CFactoryBase {
typedef SetFactory self;
typedef CFactoryBase base;
public:
typedef base::parent_type parent_type;
typedef BooleSet value_type;
SetFactory(const parent_type& ring): base(ring) {}
SetFactory(const self& rhs): base(rhs) {}
~SetFactory() {}
value_type operator()() const {
return value_type(parent());
}
value_type operator()(const value_type& rhs) const {
return rhs;
}
value_type operator()(const value_type::ring_type& ring) const {
return value_type(ring);
}
value_type operator()(value_type::idx_type idx,
const value_type& first,
const value_type& second) const {
return value_type(idx, first, second);
}
value_type operator()(value_type::idx_type idx,
value_type::navigator first,
value_type::navigator second) const {
return value_type(idx, first, second, parent());
}
value_type operator()(value_type::idx_type idx,
value_type::navigator first,
value_type::navigator second,
value_type::ring_type& ring) const {
return value_type(idx, first, second, ring);
}
value_type operator()(value_type::navigator navi,
value_type::ring_type& ring) const {
return value_type(navi, ring);
}
value_type operator()(value_type::navigator navi) const {
return value_type(navi, parent());
}
};
END_NAMESPACE_PBORI
#endif /* polybori_SetFactory_h_ */