28 _exponents(0), _varCount(0) {
44 ObjectPool(): objectsStored(0), objects(0) {}
52 return objectsStored == 0;
62 return objects[objectsStored];
69 objects[objectsStored] =
object;
76 for (
size_t i = 0;
i < objectsStored; ++
i)
81 unsigned int objectsStored;
90 pools[size].ensureInit();
91 if (!
pools[size].empty())
92 return pools[size].removeObject();
120 for (
size_t var = 0; var <
varCount; ++var) {
void nameFactoryRegister(NameFactory< AbstractProduct > &factory)
Registers the string returned by ConcreteProduct::getStaticName() to a function that default-construc...
bool equals(const Exponent *a, const Exponent *b, size_t varCount)
Returns whether the entries of a are equal to the entries of b.
const unsigned int ObjectPoolSize
const unsigned int PoolCount
bool operator==(const Term &term) const
static Exponent * allocate(size_t size)
static void deallocate(Exponent *p, size_t size)
size_t getVarCount() const
static void print(FILE *file, const Exponent *e, size_t varCount)
Writes e to file in a format suitable for debug output.
void initialize(const Exponent *exponents, size_t varCount)