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

#include <property.hh>

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

Public Member Functions

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

Private Attributes

Tree fKey
 

Detailed Description

template<>
class property< double >

Definition at line 118 of file property.hh.

Constructor & Destructor Documentation

property< double >::property ( )
inline

Definition at line 124 of file property.hh.

124 : 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< double >::property ( const char *  keyname)
inline

Definition at line 126 of file property.hh.

126 : 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< double >::clear ( Tree  t)
inline

Definition at line 144 of file property.hh.

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

145  {
146  t->clearProperty(fKey);
147  }
void clearProperty(Tree key)
Definition: tree.hh:168

Here is the call graph for this function:

bool property< double >::get ( Tree  t,
double &  x 
)
inline

Definition at line 133 of file property.hh.

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

134  {
135  Tree d = t->getProperty(fKey);
136  if (d) {
137  x = d->node().getDouble();
138  return true;
139  } else {
140  return false;
141  }
142  }
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
double getDouble() const
Definition: node.hh:105
Tree getProperty(Tree key)
Definition: tree.hh:173

Here is the call graph for this function:

void property< double >::set ( Tree  t,
double  x 
)
inline

Definition at line 128 of file property.hh.

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

129  {
130  t->setProperty(fKey, tree(Node(x)));
131  }
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< double >::fKey
private

Definition at line 120 of file property.hh.


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