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

as2js::anonymous_namespace{node_operator.cpp} Namespace Reference

Internal structures and tables used to do operator conversions. More...

Classes struct  operator_to_string_t  Structure to define an operator. More...
  Variables operator_to_string_t const g_operator_to_string []  Table of operators and operator names. More...
  size_t const g_operator_to_string_size = sizeof(g_operator_to_string) / sizeof(g_operator_to_string[0])  The size of the g_operator_to_string table. More...
  Detailed Description

The following namespace defines a structure and a table of node types with the name of the operator as a string. For debug purposes, we also include the line number.

Variable Documentation
operator_to_string_t const as2js::anonymous_namespace{node_operator.cpp}::g_operator_to_string[]

This table is used to convert operators to strings, and vice versa. The operators are sorted numerically so we can search them using a fast binary search algorithm. When compiling in debug mode, the operator_to_string() function verifies that the order is proper.

See also

Definition at line 116 of file node_operator.cpp.

size_t const as2js::anonymous_namespace{node_operator.cpp}::g_operator_to_string_size = sizeof(g_operator_to_string) / sizeof(g_operator_to_string[0])

This variable represents the size, number of structures, in the g_operator_to_string table.

Definition at line 197 of file node_operator.cpp.

Referenced by as2js::Node::operator_to_string(), and as2js::Node::string_to_operator().

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