39 lines
470 B
C++
39 lines
470 B
C++
#ifndef SAND_TYPE_H
|
|
#define SAND_TYPE_H
|
|
|
|
#include <cstdint>
|
|
|
|
namespace sand
|
|
{
|
|
|
|
class rule;
|
|
class sand;
|
|
class type
|
|
{
|
|
public:
|
|
class builder;
|
|
class range;
|
|
using id_ty = uint16_t;
|
|
|
|
bool operator==(const type&) const;
|
|
|
|
static const type OFF_GRID;
|
|
|
|
static constexpr unsigned int MAX_TYPES = UINT16_MAX;
|
|
|
|
private:
|
|
type(id_ty id);
|
|
operator id_ty() const;
|
|
|
|
id_ty id;
|
|
|
|
friend builder;
|
|
friend range;
|
|
friend rule;
|
|
friend sand;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // SAND_TYPE_H
|