tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
ceammc::Atom Class Reference

#include <ceammc_atom.h>

Inheritance diagram for ceammc::Atom:
_atom

Public Types

enum  Type { NONE, FLOAT, SYMBOL, PROPERTY }
 logical atom type More...
 

Public Member Functions

 Atom ()
 
 Atom (const t_atom &a)
 
 Atom (t_float v)
 
 Atom (t_symbol *s)
 
bool isFloat () const
 
bool isNone () const
 
bool isSymbol () const
 
bool isProperty () const
 
bool isInteger () const
 
bool isNatural () const
 
Type type () const
 
bool getFloat (t_float *v) const
 
bool getSymbol (t_symbol **s) const
 
bool getString (std::string &str) const
 
bool setFloat (t_float v, bool force=false)
 
bool setSymbol (t_symbol *s, bool force=false)
 
t_float asFloat (float def=0.f) const
 
int asInt (int def=0) const
 
size_t asSizeT (size_t def=0) const
 
t_symbolasSymbol () const
 
std::string asString () const
 
t_float asFloatInRange (float min, float max) const
 
bool operator< (const Atom &a) const
 
void output (t_outlet *x) const
 outputs atom to given outlet More...
 
void outputAsAny (t_outlet *x, t_symbol *sel) const
 
Atomoperator+= (double v)
 
Atomoperator-= (double v)
 
Atomoperator*= (double v)
 
Atomoperator/= (double v)
 
Atom operator+ (double v) const
 
Atom operator- (double v) const
 
Atom operator* (double v) const
 
Atom operator/ (double v) const
 

Static Public Attributes

static const char PROP_PREFIX = '@'
 

Friends

bool operator== (const Atom &a1, const Atom &a2)
 
bool operator!= (const Atom &a1, const Atom &a2)
 

Member Enumeration Documentation

logical atom type

Enumerator
NONE 
FLOAT 
SYMBOL 
PROPERTY 

Constructor & Destructor Documentation

ceammc::Atom::Atom ( )
ceammc::Atom::Atom ( const t_atom a)
ceammc::Atom::Atom ( t_float  v)
ceammc::Atom::Atom ( t_symbol s)

Member Function Documentation

t_float ceammc::Atom::asFloat ( float  def = 0.f) const
t_float ceammc::Atom::asFloatInRange ( float  min,
float  max 
) const
int ceammc::Atom::asInt ( int  def = 0) const
size_t ceammc::Atom::asSizeT ( size_t  def = 0) const
std::string ceammc::Atom::asString ( ) const
t_symbol* ceammc::Atom::asSymbol ( ) const
bool ceammc::Atom::getFloat ( t_float v) const

Tries to get float from atom - writes to destination only if atom type if float

Parameters
v- pointer to destination
Returns
true on success, false - if atom is not float
See Also
getSymbol
bool ceammc::Atom::getString ( std::string &  str) const
bool ceammc::Atom::getSymbol ( t_symbol **  s) const
bool ceammc::Atom::isFloat ( ) const
Returns
true if atom has logical type Atom::FLOAT
bool ceammc::Atom::isInteger ( ) const
Returns
true if atom has logical type Atom::FLOAT and value is integer
bool ceammc::Atom::isNatural ( ) const
Returns
true if atom has logical type Atom::FLOAT and value is natural (with 0)
bool ceammc::Atom::isNone ( ) const
Returns
true if atom has logical type Atom::NONE
bool ceammc::Atom::isProperty ( ) const
Returns
true if atom has logical type Atom::PROPERTY
bool ceammc::Atom::isSymbol ( ) const
Returns
true if atom has logical type Atom::SYMBOL
Atom ceammc::Atom::operator* ( double  v) const
Atom& ceammc::Atom::operator*= ( double  v)
Atom ceammc::Atom::operator+ ( double  v) const
Atom& ceammc::Atom::operator+= ( double  v)

Operators

Atom ceammc::Atom::operator- ( double  v) const
Atom& ceammc::Atom::operator-= ( double  v)
Atom ceammc::Atom::operator/ ( double  v) const
Atom& ceammc::Atom::operator/= ( double  v)
bool ceammc::Atom::operator< ( const Atom a) const
void ceammc::Atom::output ( t_outlet x) const

outputs atom to given outlet

Parameters
x- pointer to outlet
void ceammc::Atom::outputAsAny ( t_outlet x,
t_symbol sel 
) const
bool ceammc::Atom::setFloat ( t_float  v,
bool  force = false 
)
bool ceammc::Atom::setSymbol ( t_symbol s,
bool  force = false 
)
Type ceammc::Atom::type ( ) const
Returns
atom logical type

Friends And Related Function Documentation

bool operator!= ( const Atom a1,
const Atom a2 
)
friend
bool operator== ( const Atom a1,
const Atom a2 
)
friend

Member Data Documentation

const char ceammc::Atom::PROP_PREFIX = '@'
static

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