// ---------------------------------------------------------------------------
// - Sort.hpp                                                                -
// - afnix:txt library - array sorting definition                            -
// ---------------------------------------------------------------------------
// - This program is free software;  you can redistribute it  and/or  modify -
// - it provided that this copyright notice is kept intact.                  -
// -                                                                         -
// - This program  is  distributed in  the hope  that it will be useful, but -
// - without  any  warranty;  without  even   the   implied    warranty   of -
// - merchantability or fitness for a particular purpose.  In no event shall -
// - the copyright holder be liable for any  direct, indirect, incidental or -
// - special damages arising in any way out of the use of this software.     -
// ---------------------------------------------------------------------------
// - copyright (c) 1999-2005 amaury darsch                                   -
// ---------------------------------------------------------------------------

#ifndef  AFNIX_SORT_HPP
#define  AFNIX_SORT_HPP

#ifndef  AFNIX_VECTOR_HPP
#include "Vector.hpp"
#endif
 
namespace afnix {
  /// sort an array in ascending order
  /// @param robj the runnable object
  /// @param nset the current nameset
  /// @param args the arguments
  Object* txt_qsort_lth (Runnable* robj, Nameset* nset, Cons* args);

  /// sort an array in descending order
  /// @param robj the runnable object
  /// @param nset the current nameset
  /// @param args the arguments
  Object* txt_qsort_gth (Runnable* robj, Nameset* nset, Cons* args);

  /// sort an array in lexicographic order
  /// @param robj the runnable object
  /// @param nset the current nameset
  /// @param args the arguments
  Object* txt_qsort_lex (Runnable* robj, Nameset* nset, Cons* args);
}

#endif
