00001
00002
00028
00029
00030
00031 # include "pbori_defs.h"
00032 #include <vector>
00033
00034 #ifndef BooleEnv_h_
00035 #define BooleEnv_h_
00036
00037
00038 BEGIN_NAMESPACE_PBORI
00039
00040
00041 class BoolePolyRing;
00042
00043 class CDynamicOrderBase;
00044
00052 class BooleEnv:
00053 public CTypes::orderenums_type, public CTypes::compenums_type,
00054 public CTypes::auxtypes_type {
00055
00056 public:
00057
00058
00059
00060
00062 typedef BooleEnv self;
00063
00065 typedef CTypes::orderenums_type base;
00066
00068
00069 typedef CTypes::ordercode_type ordercode_type;
00070 typedef CTypes::manager_type manager_type;
00071 typedef CTypes::manager_reference manager_reference;
00072 typedef CTypes::manager_ptr manager_ptr;
00073 typedef CTypes::dd_type dd_type;
00074 typedef CTypes::vartext_type vartext_type;
00076
00078 typedef std::vector<idx_type> block_idx_type;
00079
00081 typedef block_idx_type::const_iterator block_iterator;
00082
00083
00084
00085
00086
00088 using base::ordercodes;
00089
00091 static dd_type variable(idx_type idx);
00092
00094 static dd_type persistentVariable(idx_type idx);
00095
00097 static ordercode_type getOrderCode();
00098
00101 static ordercode_type getBaseOrderCode();
00102
00104 static dd_type zero();
00105
00107 static dd_type one();
00108
00110 static size_type nVariables();
00111
00112 typedef BoolePolyRing ring_type;
00113
00114 typedef CDynamicOrderBase order_type;
00115 static ring_type& ring() { return active_ring; }
00116
00117 static manager_type& manager();
00118 static order_type& ordering();
00120 static void setVariableName(idx_type idx, vartext_type varname);
00121
00123 static vartext_type getVariableName(idx_type idx);
00124
00126
00127 static block_iterator blockBegin();
00128 static block_iterator blockEnd();
00129 static void appendBlock(idx_type idx);
00130 static void clearBlocks();
00131
00132 static idx_type lastBlockStart();
00134
00136 static void changeOrdering(ordercode_type code);
00137
00138 static void printInfo();
00139
00140 static void set(ring_type& theRing);
00141
00142
00143 protected:
00144
00145 static ring_type active_ring;
00146 };
00147
00148 END_NAMESPACE_PBORI
00149
00150 #endif // of #ifndef BooleEnv_h_