|
FAUST compiler
0.9.9.6b8
|
Class Node = (type x (int + double + Sym + void*)) More...
#include <node.hh>

Public Member Functions | |
| Node (int x) | |
| Node (double x) | |
| Node (const char *name) | |
| Node (const string &name) | |
| Node (Sym x) | |
| Node (void *x) | |
| Node (const Node &n) | |
| bool | operator== (const Node &n) const |
| bool | operator!= (const Node &n) const |
| int | type () const |
| int | getInt () const |
| double | getDouble () const |
| Sym | getSym () const |
| void * | getPointer () const |
| operator int () const | |
| operator double () const | |
| ostream & | print (ostream &fout) const |
| print a node on a stream | |
Private Attributes | |
| int | fType |
| union { | |
| int i | |
| double f | |
| Sym s | |
| void * p | |
| } | fData |
| Node::Node | ( | int | x | ) | [inline] |
| Node::Node | ( | double | x | ) | [inline] |
Definition at line 83 of file node.hh.
: fType(kDoubleNode) { fData.f = x; }
| Node::Node | ( | const char * | name | ) | [inline] |
| Node::Node | ( | const string & | name | ) | [inline] |
| Node::Node | ( | Sym | x | ) | [inline] |
| Node::Node | ( | void * | x | ) | [inline] |
| Node::Node | ( | const Node & | n | ) | [inline] |
| double Node::getDouble | ( | ) | const [inline] |
Definition at line 99 of file node.hh.
Referenced by property< double >::get(), isDouble(), isGEZero(), isGTZero(), isMinusOne(), isOne(), and isZero().
{ return fData.f; }

| int Node::getInt | ( | ) | const [inline] |
Definition at line 98 of file node.hh.
Referenced by CTree::calcTreeHash(), property< int >::get(), getBoxType(), Occurrences::getCount(), getDefLineProp(), ScalarCompiler::getSharingCount(), DocCompiler::getSharingCount(), isGEZero(), isGTZero(), isInt(), isMinusOne(), isOne(), isZero(), and shcount().
{ return fData.i; }

| void* Node::getPointer | ( | ) | const [inline] |
Definition at line 101 of file node.hh.
Referenced by property< Loop * >::access(), and isPointer().
{ return fData.p; }

| Sym Node::getSym | ( | ) | const [inline] |
Definition at line 100 of file node.hh.
Referenced by isSym(), merge_trans_op(), and Trans::operator<().
{ return fData.s; }

| Node::operator double | ( | ) | const [inline] |
| Node::operator int | ( | ) | const [inline] |
Definition at line 104 of file node.hh.
References kDoubleNode, and kIntNode.
| bool Node::operator!= | ( | const Node & | n | ) | const [inline] |
| bool Node::operator== | ( | const Node & | n | ) | const [inline] |
| ostream & Node::print | ( | ostream & | fout | ) | const |
print a node on a stream
< print a node on a stream
Definition at line 3 of file node.cpp.
References kDoubleNode, kIntNode, kPointerNode, and kSymNode.
Referenced by operator<<().
{
switch (fType) {
case kIntNode : return fout << fData.i;
case kDoubleNode : return fout << fData.f;
case kSymNode : return fout << *(fData.s);
case kPointerNode : return fout << "ptr:" << fData.p;
default : return fout << "badnode";
}
// return fout;
}

| int Node::type | ( | ) | const [inline] |
Definition at line 96 of file node.hh.
Referenced by CTree::calcTreeHash(), isDouble(), isGEZero(), isGTZero(), isInt(), isMinusOne(), isOne(), isPointer(), isSym(), and isZero().
{ return fType; }

| double Node::f |
Definition at line 75 of file node.hh.
Referenced by operator!=(), and operator==().
union { ... } Node::fData [private] |
Referenced by Node(), operator!=(), and operator==().
int Node::fType [private] |
Definition at line 72 of file node.hh.
Referenced by operator!=(), and operator==().
1.8.0