# Simple types reference

The simple types are defined as instances of the abstract class SimpleType, defined in

    type/SimpleType.h

. They have one method in addition to the base Type:

    int getSize() const;

It returns the size of the value of this type. For void it's 0, for string 1 (the minimal size of an empty string, consisting of only a \0 at the end), for the rest of them it's a sizeof. This size is used to extract the values from and copy the values to the compact row format.

For now this is the absolute minimum of information that makes the data usable. The list of methods will be extended over time. For example, the methods for value comparisons will eventually go here. And if the rows will ever hold the aligned values, the alignment information too.

The classes for all the actual simple types are defined in

    type/AllSimpleTypes.h

:

    VoidType
    Uint8Type
    Int32Type
    Int64Type
    Float64Type
    StringType

You can construct the new objects of these classes but usually the pre-created shared objects are easier to use, as described in &xrsp;. The shared objects also make the type comparisons for equality and match more efficient, since the comparison gets short-circuited at the object pointer stage.

SimpleType
VoidType
Uint8Type
Int32Type
Int64Type
Float64Type
StringType