From 3955eeee449327250522c12721b8c37250752a18 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sat, 5 Jul 2003 02:32:45 +0000 Subject: "" svn path=/trunk/; revision=746 --- externals/grill/flext/source/flsupport.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'externals/grill/flext/source/flsupport.h') 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 -- cgit v1.2.1