#ifndef __Sheet_H
#define __Sheet_H

#include "SmallArray.h"
#include <iostream>
#include "Strand.h"

/*
CLASS 
  Sheet
  
  This class defines a beta sheet that is constructed from beta strands

KEWORDS
  beta, sheet, starnd, parallelism, connection, nytrogen group, 
  hydrogen bonding

AUTHORS
  Zipi Fligelamn (zipo@math.tau.ac.il)

  Copyright: SAMBA group, Tel-Aviv Univ. Israel, 1999.

CHANGES LOG
<UL>
<LI>
</UL>

GOALS
  The goals of this class is to define the secondary structure knows as
  beta sheet. Taking all the appropriate information from the 
  the strand lines in the pdb file. It builds the sheet strand by strand (aka.
  line by line). It also performs all kind of sanity checks like not
  entering a strand with the index number 5 when we inly have 4 strands in
  the helix.

USAGE
*/
class Sheet 
  : public SmallArray< Strand>
{
public:
    typedef SmallArray< Strand> BetaSheet;
    typedef BetaSheet::iterator iterator;
    typedef BetaSheet::const_iterator const_iterator;
    
    //// Empty constructor
    Sheet();
    
    //// Regular constructor need to know the number of strands the sheet
    // will hold there is no possibility to enter more strands then this number
    Sheet(const unsigned short size, const char sheet_id[]);
  
    //// Strarting the sheet from any strand PDB line though it is highly
    // recommended to start it from the first line.
    explicit Sheet(const char* const PDBrec);
  
    Sheet(const Sheet& sh);
    
    // Group: Data member returning
    inline const char* sheetId() const;
  
    //// Checking if a certain code belongs to the current sheet code
    bool isCurrSheet(const char sheetId[]) const;

    ///// Adding strands with all the appropriate sanity checks.
    bool add(const char* const PDBrec);

    //// Assigment Operator
    Sheet& operator=(const Sheet& rhs);

    
    //// streaming to output in the following format:
    // SHEET <Name>
    // list of all the strands in the strand fromat
    friend ostream& operator<<(ostream& s, const Sheet& bs); 
    
private:
  char snum[3];
};

/*****************************
  Inline Definitions
  ***************************/
const char* Sheet::sheetId() const
{
  return snum;
}
#endif








