FAUST compiler  0.9.9.6b8
Public Member Functions | Private Attributes | List of all members
property< int > Class Template Reference

#include <property.hh>

Collaboration diagram for property< int >:
Collaboration graph
[legend]

Public Member Functions

 property ()
 
 property (const char *keyname)
 
void set (Tree t, int i)
 
bool get (Tree t, int &i)
 
void clear (Tree t)
 

Private Attributes

Tree fKey
 

Detailed Description

template<>
class property< int >

Definition at line 85 of file property.hh.

Constructor & Destructor Documentation

property< int >::property ( )
inline

Definition at line 91 of file property.hh.

91 : fKey(tree(Node(unique("property_")))) {}
Symbol * unique(const char *str)
Returns a new unique symbol of name strxxx.
Definition: symbol.hh:97
Class Node = (type x (int + double + Sym + void*))
Definition: node.hh:75
Tree tree(const Node &n)
Definition: tree.hh:186
property< int >::property ( const char *  keyname)
inline

Definition at line 93 of file property.hh.

93 : fKey(tree(Node(keyname))) {}
Class Node = (type x (int + double + Sym + void*))
Definition: node.hh:75
Tree tree(const Node &n)
Definition: tree.hh:186

Member Function Documentation

void property< int >::clear ( Tree  t)
inline

Definition at line 111 of file property.hh.

References CTree::clearProperty(), and property< P >::fKey.

112  {
113  t->clearProperty(fKey);
114  }
void clearProperty(Tree key)
Definition: tree.hh:168

Here is the call graph for this function:

bool property< int >::get ( Tree  t,
int &  i 
)
inline

Definition at line 100 of file property.hh.

References property< P >::fKey, Node::getInt(), CTree::getProperty(), and CTree::node().

101  {
102  Tree d = t->getProperty(fKey);
103  if (d) {
104  i = d->node().getInt();
105  return true;
106  } else {
107  return false;
108  }
109  }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
int getInt() const
Definition: node.hh:104
Tree getProperty(Tree key)
Definition: tree.hh:173

Here is the call graph for this function:

void property< int >::set ( Tree  t,
int  i 
)
inline

Definition at line 95 of file property.hh.

References property< P >::fKey, CTree::setProperty(), and tree().

96  {
97  t->setProperty(fKey, tree(Node(i)));
98  }
Class Node = (type x (int + double + Sym + void*))
Definition: node.hh:75
void setProperty(Tree key, Tree value)
Definition: tree.hh:167
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Member Data Documentation

Tree property< int >::fKey
private

Definition at line 87 of file property.hh.


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