/* $Id: env_var.h,v 1.2 1999/07/30 17:55:48 v2kea318 Exp $

$Log: env_var.h,v $
 * Revision 1.2  1999/07/30  17:55:48  v2kea318
 * Reformat the header file names for Standard C++ compliance.
 *
 * Revision 1.1  1999/05/18  14:51:54  v2kea318
 * Initial revision
 *
***************************************************************************

A routine to get the value of a specified environment variable.  If the
variable is not defined, a no_env_variable  exception will be thrown.

***************************************************************************/

#ifndef MSG_ENV_VAR_H
#define MSG_ENV_VAR_H

#include <cstdlib>
#include <stdexcept>
#include <string>

// define the exception.
class no_env_variable : public runtime_error {
public:
  // pass the variable name.
  no_env_variable(const string& v);
  const string& variable() const { return var; };
private:
  string var;
};

// prototype the routine.
string get_env_var(const string& v);

#endif
