node.hh File Reference

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

#include <iostream>
#include "symbol.hh"

Go to the source code of this file.

Classes

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

Enumerations

enum  
 Tags used to define the type of a Node.


Detailed Description

A Node is a tagged unions of int, float, 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 float content

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

n->getInt(); : int content of n n->getFloat(); : float content of n n->getSym(); : symbol content of n

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

Definition in file node.hh.


Generated on Sun Mar 22 16:24:30 2009 for FAUST compiler by  doxygen 1.5.7.1