FAUST compiler  0.9.9.6b8
Public Member Functions | Private Attributes | List of all members
xtended Class Referenceabstract

#include <xtended.hh>

Inheritance diagram for xtended:
Inheritance graph
[legend]
Collaboration diagram for xtended:
Collaboration graph
[legend]

Public Member Functions

 xtended (const char *name)
 
virtual ~xtended ()
 
Sym symbol ()
 
const char * name ()
 
Tree box ()
 
virtual unsigned int arity ()=0
 
virtual string generateCode (Klass *klass, const vector< string > &args, const vector< Type > &types)=0
 
virtual string generateLateq (Lateq *lateq, const vector< string > &args, const vector< Type > &types)=0
 
virtual int infereSigOrder (const vector< int > &args)=0
 
virtual Type infereSigType (const vector< Type > &args)=0
 
virtual Tree computeSigOutput (const vector< Tree > &args)=0
 
virtual bool needCache ()=0
 
virtual bool isSpecialInfix ()
 generaly false, but true for binary op # such that #(x) == _::x More...
 

Private Attributes

SymbolfSymbol
 the symbol the xtended is attached to More...
 

Detailed Description

Definition at line 12 of file xtended.hh.

Constructor & Destructor Documentation

xtended::xtended ( const char *  name)
inline

Definition at line 18 of file xtended.hh.

References fSymbol, and setUserData().

18  :
19  fSymbol(::symbol(name)) {
20  setUserData(fSymbol, (void*)this);
21  }
void setUserData(Symbol *sym, void *d)
Set user data.
Definition: symbol.hh:101
const char * name()
Definition: xtended.hh:25
Symbol * fSymbol
the symbol the xtended is attached to
Definition: xtended.hh:14
Sym symbol()
Definition: xtended.hh:24

Here is the call graph for this function:

virtual xtended::~xtended ( )
inlinevirtual

Definition at line 22 of file xtended.hh.

References fSymbol, and setUserData().

22 { setUserData(fSymbol, 0); }
void setUserData(Symbol *sym, void *d)
Set user data.
Definition: symbol.hh:101
Symbol * fSymbol
the symbol the xtended is attached to
Definition: xtended.hh:14

Here is the call graph for this function:

Member Function Documentation

virtual unsigned int xtended::arity ( )
pure virtual
Tree xtended::box ( )
inline

Definition at line 27 of file xtended.hh.

References fSymbol, getUserData(), and tree().

Referenced by yyparse().

27  {
28  Tree b = tree(fSymbol);
29  assert(getUserData(b) != 0);
30  return b;
31  }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Symbol * fSymbol
the symbol the xtended is attached to
Definition: xtended.hh:14
Tree tree(const Node &n)
Definition: tree.hh:186
void * getUserData(Symbol *sym)
Returns user data.
Definition: symbol.hh:100

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Tree xtended::computeSigOutput ( const vector< Tree > &  args)
pure virtual
virtual string xtended::generateCode ( Klass klass,
const vector< string > &  args,
const vector< Type > &  types 
)
pure virtual
virtual string xtended::generateLateq ( Lateq lateq,
const vector< string > &  args,
const vector< Type > &  types 
)
pure virtual
virtual int xtended::infereSigOrder ( const vector< int > &  args)
pure virtual

Implemented in SqrtPrim, Log10Prim, PowPrim, RintPrim, LogPrim, AbsPrim, MaxPrim, MinPrim, RemainderPrim, AcosPrim, AsinPrim, Atan2Prim, AtanPrim, CeilPrim, CosPrim, ExpPrim, FloorPrim, FmodPrim, SinPrim, and TanPrim.

Referenced by infereSigOrder().

Here is the caller graph for this function:

virtual Type xtended::infereSigType ( const vector< Type > &  args)
pure virtual

Implemented in AbsPrim, Log10Prim, MaxPrim, MinPrim, RemainderPrim, RintPrim, SqrtPrim, AcosPrim, AsinPrim, Atan2Prim, AtanPrim, CeilPrim, CosPrim, ExpPrim, FloorPrim, FmodPrim, LogPrim, PowPrim, SinPrim, and TanPrim.

Referenced by infereXType().

Here is the caller graph for this function:

virtual bool xtended::isSpecialInfix ( )
inlinevirtual

generaly false, but true for binary op # such that #(x) == _::x

Reimplemented in PowPrim.

Definition at line 42 of file xtended.hh.

const char* xtended::name ( )
inline

Definition at line 25 of file xtended.hh.

References fSymbol, and name().

Referenced by generateInsideSchema(), boxpp::print(), ppsig::printextended(), and sigLabel().

Symbol * fSymbol
the symbol the xtended is attached to
Definition: xtended.hh:14
const char * name(Symbol *sym)
Returns the name of a symbol.
Definition: symbol.hh:98

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool xtended::needCache ( )
pure virtual
Sym xtended::symbol ( )
inline

Member Data Documentation

Symbol* xtended::fSymbol
private

the symbol the xtended is attached to

Definition at line 14 of file xtended.hh.

Referenced by box(), name(), symbol(), xtended(), and ~xtended().


The documentation for this class was generated from the following file: