// sequence.cpp (UNFINISHED)
// Glenn G. Chappell
// Version 2
// 31 Mar 2008
//
// For CS 311 Spring 2008
// Source for class Sequence
// Smart array class

#include "sequence.h"  // Header correponding to this source file

#include <algorithm>   // for std::copy


// ************************************************************************
// class Sequence - Member function definitions
// ************************************************************************


// copy ctor
// Pre:
// Post:
// Strong Guarantee
Sequence::Sequence(const Sequence & other)
    :size_(other.size_),
     capacity_(other.size_ >= MINCAP ? other.size_ : MINCAP),
     data_(new value_type[capacity_])
     // capacity_ must be declared before data_
{
    std::copy(other.begin(), other.end(), begin());
}


// Copy assignment
// Pre:
// Post:
// ??? Guarantee
Sequence & Sequence::operator=(const Sequence & rhs)
{
    // WRITE THIS!!!
    return *this;
}


// resize
// Pre:
// Post:
// ??? Guarantee
void Sequence::resize(size_type newSize)
{
    // WRITE THIS!!!
}


// insert
// Pre:
// Post:
// ??? Guarantee
Sequence::iterator Sequence::insert(Sequence::iterator pos,
                                    const Sequence::value_type & item)
{
    // WRITE THIS!!!
    return 0;  // Dummy line, so it will compile
}


// remove
// Pre:
// Post:
// ??? Guarantee
Sequence::iterator Sequence::remove(Sequence::iterator pos)
{
    // WRITE THIS!!!
    return 0;  // Dummy line, so it will compile
}


// swap
// Pre:
// Post:
// ??? Guarantee
void Sequence::swap(Sequence & other)
{
    // WRITE THIS!!!
}
