67 #include <boost/preprocessor/cat.hpp>
68 #include <boost/preprocessor/seq/for_each.hpp>
69 #include <boost/preprocessor/facilities/expand.hpp>
70 #include <boost/preprocessor/stringize.hpp>
72 #ifndef pbori_traits_h_
73 #define pbori_traits_h_
82 template <
class ValueType>
92 typedef typename value_type::dd_type
dd_type;
154 template <
class ValueType>
159 template <
class ValueType>
170 template <
class FirstType,
class SecondType>
173 template <
class OnlyType>
179 template <
class FirstType,
class SecondType>
187 template <
class MgrType>
207 template <
class CuddLike>
234 template <
class CuddLike>
235 struct mgrcore_traits;
238 struct mgrcore_traits<Cudd> {
261 #define PB_DECLARE_CUDD_TYPES(fromspace) \
262 typedef fromspace::errorfunc_type errorfunc_type; \
263 typedef fromspace::large_size_type large_size_type; \
264 typedef fromspace::refcount_type refcount_type; \
265 typedef fromspace::node_type node_type; \
266 typedef fromspace::mgrcore_type mgrcore_type; \
267 typedef fromspace::unary_int_function unary_int_function; \
268 typedef fromspace::void_function void_function; \
269 typedef fromspace::binary_function binary_function; \
270 typedef fromspace::binary_int_function binary_int_function; \
271 typedef fromspace::ternary_function ternary_function; \
272 typedef fromspace::int_unary_function int_unary_function; \
273 typedef fromspace::size_type size_type;\
274 typedef fromspace::idx_type idx_type;
282 template <
class ZDDType>
286 struct zdd_traits<ZDD> {
296 #define PB_BINARY_FUNC_CALL(count, funcname, arg_pair) \
297 BOOST_PP_EXPAND(funcname(BOOST_PP_SEQ_HEAD(arg_pair), \
298 BOOST_PP_SEQ_HEAD(BOOST_PP_SEQ_TAIL(arg_pair))))
300 template<
unsigned ErrorNumber>
310 #define PB_CUDD_ERROR_TRAITS(errcode, errstr) \
311 template<> inline cudd_error_traits<errcode>::result_type \
312 cudd_error_traits<errcode>::operator()() const { \
313 return BOOST_PP_STRINGIZE(errstr); }
316 ((CUDD_MEMORY_OUT)(Out of memory.))
317 ((CUDD_TOO_MANY_NODES)(Too many nodes.))
318 ((CUDD_MAX_MEM_EXCEEDED)(Maximum memory exceeded.))
319 ((CUDD_INVALID_ARG)(Invalid argument.))
320 ((CUDD_INTERNAL_ERROR)(Internal error.))
321 ((CUDD_NO_ERROR)(Unexpected error.))
324 #undef PB_CUDD_ERROR_TRAITS