/* This file contains the definitions for library Rock.

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

#include "Rock.h"

RockKind Kind(RockName Rock)
{
   switch (Rock)                     // if the rock is...
   {
      case Basalt: case Granite:     //   any of these, then
      case Obsidian:                 //      its an igneous rock
         return Igneous;
      case Marble: case Quartzite:   //   any of these, then
      case Slate:                    //     it's a metamorphic rock
         return Metamorphic;
      case Dolomite: case Limestone: //   any of these, then
      case Sandstone: case Shale:    //     it's a sedimentary rock
         return Sedimentary;

      default:                       //   just in case...
         cerr << "\n*** Kind received invalid RockName: "
              << Rock << endl;
   }
   return KindError;
}
