as2js: as2js::anonymous_namespace{node_type.cpp} Namespace Reference

as2js::anonymous_namespace{node_type.cpp} Namespace Reference

Private definitions of the node type. More...

Classes struct  type_name_t  Structure used to define the name of each node type. More...
  Variables type_name_t const g_node_type_name []  List of node types with their name. More...
  size_t const g_node_type_name_size = sizeof(g_node_type_name) / sizeof(g_node_type_name[0])  Define the size of the node type table. More...
  Detailed Description

Local declarations defining a table of node types and their name so we can convert a node type to a string. The main purpose of which is to generate meaningful errors (i.e. 'had a problem with node type #38', or 'had a problem with node of type "ABSTRACT"'.)

Variable Documentation
type_name_t const as2js::anonymous_namespace{node_type.cpp}::g_node_type_name[]

This table defines a list of node types with their corresponding name defined as a string. The definitions make use of the NODE_TYPE_NAME() macro to better ensure validity of each entry (i.e. the identifier used with the NODE_TYPE_NAME() is transformed to a NODE_... name and the corresponding string make it impossible to have either non-synchronized.)

The table is sorted by type (node_t::NODE_...). In debug mode, the type_to_string() function verifies that the order remains valid.

Definition at line 134 of file node_type.cpp.

size_t const as2js::anonymous_namespace{node_type.cpp}::g_node_type_name_size = sizeof(g_node_type_name) / sizeof(g_node_type_name[0])

This parameter represents the number of node type structures.

Definition at line 319 of file node_type.cpp.

Referenced by as2js::Node::type_to_string().

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly