aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flsupport.h
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-07-05 02:32:45 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-07-05 02:32:45 +0000
commit3955eeee449327250522c12721b8c37250752a18 (patch)
treee279a66505391732ac9a27017f12e55601301b37 /externals/grill/flext/source/flsupport.h
parenta7bde0ac21a716bc1cbf08e1bc1545cce898b3fe (diff)
""
svn path=/trunk/; revision=746
Diffstat (limited to 'externals/grill/flext/source/flsupport.h')
-rw-r--r--externals/grill/flext/source/flsupport.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h
index 457ed4d0..f2129d7c 100644
--- a/externals/grill/flext/source/flsupport.h
+++ b/externals/grill/flext/source/flsupport.h
@@ -293,6 +293,15 @@ public:
//! Set atom from another atom
static void SetAtom(t_atom &a,const t_atom &b) { CopyAtom(&a,&b); }
+ //! Compare two atoms
+ static int CmpAtom(const t_atom &a,const t_atom &b);
+
+ static bool operator ==(const t_atom &a,const t_atom &b) { return CmpAtom(a,b) == 0; }
+ static bool operator !=(const t_atom &a,const t_atom &b) { return CmpAtom(a,b) != 0; }
+ static bool operator <(const t_atom &a,const t_atom &b) { return CmpAtom(a,b) < 0; }
+ static bool operator <=(const t_atom &a,const t_atom &b) { return CmpAtom(a,b) <= 0; }
+ static bool operator >(const t_atom &a,const t_atom &b) { return CmpAtom(a,b) > 0; }
+ static bool operator >=(const t_atom &a,const t_atom &b) { return CmpAtom(a,b) >= 0; }
#if FLEXT_SYS == FLEXT_SYS_JMAX
//! Set atom from another atom
@@ -479,6 +488,16 @@ public:
//! Set list by another AtomList
AtomList &operator =(const AtomList &a) { return operator()(a.Count(),a.Atoms()); }
+ //! Compare list to another AtomList ( -1..< , 0..==, 1...> )
+ int Compare(const AtomList &a) const;
+
+ bool operator <(const AtomList &a) const { return Compare(a) < 0; }
+ bool operator <=(const AtomList &a) const { return Compare(a) <= 0; }
+ bool operator >(const AtomList &a) const { return Compare(a) > 0; }
+ bool operator >=(const AtomList &a) const { return Compare(a) >= 0; }
+ bool operator ==(const AtomList &a) const { return Compare(a) == 0; }
+ bool operator !=(const AtomList &a) const { return Compare(a) != 0; }
+
//! Get number of atoms in the list
int Count() const { return cnt; }
//! Get a reference to an indexed atom