taco-db  0.1.0
Namespaces | Macros | Functions | Variables
NodeTag.cpp File Reference
#include "utils/tree/NodeTag.h"
#include "utils/misc.h"
#include "utils/tree/node_tags.inc"

Namespaces

 taco
 

Macros

#define NODE_TAG_GROUP_NUMBER_MASK   0xf000
 
#define NODE_TAG_GROUP_NUMBER_SHIFT   12
 
#define NODE_TAG_MAX_NUM_GROUPS   16
 
#define NODE_TAG_GROUP_OFFSET_MASK   0x0fff
 
#define node_tag_group_number(tag)
 
#define node_tag_group_offset(tag)    (((uint16_t) tag) & NODE_TAG_GROUP_OFFSET_MASK)
 
#define NODE_TAG(...)
 
#define NODE_TAG(clsname, ...)   STRINGIFY(clsname),
 
#define NODE_TAG(clsname, ...)   CONCAT(NodeTag::T_, CAR(__VA_ARGS__)),
 

Functions

static constexpr uint16_t taco::node_tag_offset (NodeTag tag)
 
const char * taco::node_tag_name (NodeTag tag)
 Returns the class name of the tag's class. More...
 
NodeTag taco::node_tag_base (NodeTag tag)
 Returns the immediate base class of `‘tag’'. More...
 
bool taco::node_tag_is_a (NodeTag tag1, NodeTag tag2)
 Returns whether tag1'' is a class derived fromtag2''. More...
 

Variables

static constexpr const uint16_t taco::node_tag_group_count [16]
 
static constexpr const uint16_t taco::node_tag_group_base_offset [16]
 
static constexpr const uint16_t taco::num_node_tags
 
static const char *const taco::node_tag_name_ [num_node_tags]
 
static constexpr NodeTag taco::node_tag_base_ [num_node_tags]
 

Macro Definition Documentation

◆ NODE_TAG [1/3]

#define NODE_TAG (   ...)
Value:
IF_EMPTY(CADDR(__VA_ARGS__), + 1) \
IF_NONEMPTY_COMMA(CADDR(__VA_ARGS__), + 0) \
IF_NONEMPTY(CADDR(__VA_ARGS__), 1)
#define IF_EMPTY(arg,...)
Definition: misc.h:31
#define CADDR(...)
Definition: misc.h:84

◆ NODE_TAG [2/3]

#define NODE_TAG (   clsname,
  ... 
)    STRINGIFY(clsname),

◆ NODE_TAG [3/3]

#define NODE_TAG (   clsname,
  ... 
)    CONCAT(NodeTag::T_, CAR(__VA_ARGS__)),

◆ node_tag_group_number

#define node_tag_group_number (   tag)
Value:
((((uint16_t) tag) & NODE_TAG_GROUP_NUMBER_MASK) >> \
#define NODE_TAG_GROUP_NUMBER_SHIFT
Definition: NodeTag.cpp:8
#define NODE_TAG_GROUP_NUMBER_MASK
Definition: NodeTag.cpp:7

◆ NODE_TAG_GROUP_NUMBER_MASK

#define NODE_TAG_GROUP_NUMBER_MASK   0xf000

◆ NODE_TAG_GROUP_NUMBER_SHIFT

#define NODE_TAG_GROUP_NUMBER_SHIFT   12

◆ node_tag_group_offset

#define node_tag_group_offset (   tag)     (((uint16_t) tag) & NODE_TAG_GROUP_OFFSET_MASK)

◆ NODE_TAG_GROUP_OFFSET_MASK

#define NODE_TAG_GROUP_OFFSET_MASK   0x0fff

◆ NODE_TAG_MAX_NUM_GROUPS

#define NODE_TAG_MAX_NUM_GROUPS   16