from Partition.hpp:41
class Partition : public AbstractPartition
{
public:
typedef ListOfTypes SupportedTypesList;
enum
{
INTS_PR_ELEMENT = (sizeof(typename meta::select_type_maxsize< SupportedTypesList >::type) + sizeof(int) - 1) / sizeof(int),
SIZE_OF_ELEMENT = INTS_PR_ELEMENT * sizeof(int)
};
Partition() : AbstractPartition()
{
}
virtual ~Partition()
{
}
virtual uint16_t capacity() const
{
return NUMBER_OF_ELEMENTS;
}
virtual uint32_t element_size()
{
return sizeof(stBlocks[0]);
}
protected:
virtual void* element(uint16_t index)
{
return &stBlocks[index];
}
virtual const void* element(uint16_t index) const
{
return &stBlocks[index];
}
private:
struct Block
{
int filler[INTS_PR_ELEMENT];
};
Block stBlocks[NUMBER_OF_ELEMENTS];
};