Inside a macro I would like to establish a new type of float. One of the parameters to be set during that process is \ftype@TYPE, where TYPE is the float type: figure, table, and so on. I know, that \ftype@figure = 1 and \ftype@table = 2 normally are already set in the classes, e.g. report.cls, and I know, that each following float type gets a number, that is double the one before, so the next one would be 4, then 8, then 16 and so on.
What I don't know, though: How can one inside a macro find out, which is the highest float type number already in use -- for not using one twice?
\newfloat
fromfloat
package?!htbp
allowed positions are packed into a 32 bit integer each item contributing 1 bit ie 1 power of 2\newfloat
from the float package does, so I was suggesting you use that. Core latex does not keep record of already allocated floats, a class just has to "know", so using the float (or its related newfloat) package to handle the allocation is best.