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 |
Class Node = (type x (int + double + Sym + void*)).
Definition at line 70 of file node.hh.
Node::Node | ( | int | x | ) | [inline] |
Node::Node | ( | double | x | ) | [inline] |
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.
References fData.
Referenced by isDouble(), isGEZero(), isGTZero(), isMinusOne(), isOne(), and isZero().
00099 { return fData.f; }
int Node::getInt | ( | ) | const [inline] |
Definition at line 98 of file node.hh.
References fData.
Referenced by CTree::calcTreeHash(), getBoxType(), Occurrences::getCount(), getDefLineProp(), ScalarCompiler::getSharingCount(), DocCompiler::getSharingCount(), isGEZero(), isGTZero(), isInt(), isMinusOne(), isOne(), isZero(), and shcount().
00098 { return fData.i; }
void* Node::getPointer | ( | ) | const [inline] |
Definition at line 101 of file node.hh.
References fData.
Referenced by property< Loop * >::access(), and isPointer().
00101 { return fData.p; }
Sym Node::getSym | ( | ) | const [inline] |
Definition at line 100 of file node.hh.
References fData.
Referenced by isSym(), merge_trans_op(), and Trans::operator<().
00100 { return fData.s; }
Node::operator double | ( | ) | const [inline] |
Node::operator int | ( | ) | const [inline] |
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<<().
00004 { 00005 switch (fType) { 00006 case kIntNode : return fout << fData.i; 00007 case kDoubleNode : return fout << fData.f; 00008 case kSymNode : return fout << *(fData.s); 00009 case kPointerNode : return fout << "ptr:" << fData.p; 00010 default : return fout << "badnode"; 00011 } 00012 00013 // return fout; 00014 }
int Node::type | ( | ) | const [inline] |
Definition at line 96 of file node.hh.
References fType.
Referenced by CTree::calcTreeHash(), isDouble(), isGEZero(), isGTZero(), isInt(), isMinusOne(), isOne(), isPointer(), isSym(), and isZero().
00096 { return fType; }
double Node::f |
Definition at line 75 of file node.hh.
Referenced by operator!=(), and operator==().
union { ... } Node::fData [private] |
Referenced by getDouble(), getInt(), getPointer(), getSym(), Node(), operator double(), operator int(), operator!=(), and operator==().
int Node::fType [private] |
Definition at line 72 of file node.hh.
Referenced by operator double(), operator int(), operator!=(), operator==(), and type().