/* This file contains the declarations for library Rock.

...
------------------------------------------------------------*/

#include <iostream.h>

enum RockKind {                   // classification by origin:
               Igneous,           //    volcanic
               Metamorphic,       //    high temp/pressure
               Sedimentary,       //    deposits of sediment
               KindError};        //    none of the above

/* --- The iostream operations for a RockKind value -------------*/
ostream& operator<< (ostream& Out, RockKind Kind);
istream& operator>> (istream& In, RockKind& Kind);


enum RockTexture {                // classification by texture:
                  Coarse,         //    rough
                  Intermediate,   //    less-rough
                  Fine,           //    smooth
                  TextureError};  //    none of the above

/* --- The iostream operations for a RockTexture value ----------*/
ostream& operator<< (ostream& Out, RockTexture Texture);
istream& operator>> (istream& In, RockTexture& Texture);


enum RockName {                   // some common rocks, in
                Basalt, Dolomite, //   alphabetical order
                Granite, Limestone,
                Marble, Obsidian,
                Quartzite, Sandstone,
                Shale, Slate,
                NameError};

/*--- The iostream operators for a RockName value ----------------*/
ostream& operator<< (ostream& Out, RockName Rock);
istream& operator>> (istream& In, RockName& Rock);


/* --- Map a rock to its kind ------------------------------------

   Receive: Rock, a RockName value.
   Return:  The (RockKind) classification of Rock.
------------------------------------------------------------------*/
RockKind Kind(RockName Rock);


/* --- Map a rock to its texture ----------------------------------

   Receive: Rock, a RockName value.
   Return:  The (RockTexture) classification of Rock.
------------------------------------------------------------------*/
RockTexture Texture(RockName Rock);


