/* This file is part of cardwords
   (c) 1998 1999 2000 Tobias Peters
   see file COPYING for the copyright terms.
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   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.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#ifndef CARDWORDS_CARDSELECTION_HH
#define CARDWORDS_CARDSELECTION_HH

#include <vector>
#include "cardwords_carddescription.hh"
class istream;
class ostream;

namespace CardWords {
/*
  A cardselection is similar to a one-dimenional card-container, except for:
  - A selection is no "physical" object, but an object in mind. Therefor,
    it contains CardDescriptions instead of Cards.
  - It has no fixed length.

  The purpose of card selections: base class for Trade-ins and
  moves to the table
*/

/* The input/output format of CardSelection:
   N <N times CardDescriptions>
   N is the number of cards in the selection
   The input/output format of CardDescriptions is described in
   the file cardwords_cardbase.hh.
*/


class CardSelection : public vector<CardDescription> {
public:
  CardSelection (istream &);

  CardSelection ();

  CardSelection & operator +=(const CardBase &);
  CardSelection & operator +=(const CardSelection &);

  CardSelection & operator=(const CardBase &);

  void clear(void);
};
}
istream & operator >>( istream &, CardWords::CardSelection &);
ostream & operator <<( ostream &, const CardWords::CardSelection &);

#endif

