node.hh File Reference

A Node is a tagged unions of int, double, symbol and void* used in the implementation of CTrees. More...

#include <iostream>
#include "symbol.hh"
Include dependency graph for node.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Node
 Class Node = (type x (int + double + Sym + void*)). More...

Enumerations

enum  
 

Tags used to define the type of a Node.



Detailed Description

A Node is a tagged unions of int, double, symbol and void* used in the implementation of CTrees.

Nodes are completly described by the node.h file, there is no node.cpp file.

API:

Node(symbol("abcd")); : node with symbol content Node(10); : node with int content Node(3.14159); : node with double content

n->type(); : kIntNode or kDoubleNode or kSymNode

n->getInt(); : int content of n n->getDouble(); : double content of n n->getSym(); : symbol content of n

if (isInt(n, &i)) ... : int i = int content of n if (isDouble(n, &f)) ... : double f = double content of n if (isSym(n, &s)) ... : Sym s = Sym content of n

Definition in file node.hh.

Generated by  doxygen 1.6.2-20100208