/*------------------------------------------------------------------------------
 src/lib/dj/djSeq.h
 
 Copyright (c) 2004-2006 Darby Johnston.
 All rights reserved.
 Use is subject to license terms.
------------------------------------------------------------------------------*/

#ifndef DJ_SEQ_H
#define DJ_SEQ_H
#include <djBase.h>

namespace dj {

// Frame sequence.
//
class Seq {
public:

  Seq();
  Seq(int start, int end, int pad = 0);

  // Set.
  //
  void set(int start, int end, int pad = 0);
  
  // Get.
  //
  int start() const { return _start; }
  int end() const { return _end; }
  int pad() const { return _pad; }

private:

  int _start, _end, _pad;
};

// Conversion.
//
const Str toStr(const Seq &);
const Seq toSeq(const Str &);
const Str frameToStr(int in, int pad = 0);
int toFrame(const Str & in, int * pad = 0);

// Debugging.
//
Dbg & operator << (Dbg &, const Seq &);

}

#endif
