// ---------------------------------------------------------------------------
// - Options.hpp                                                             -
// - afnix interpreter - options class definitions                           -
// ---------------------------------------------------------------------------
// - This program is free software;  you can redistribute it  and/or  modify -
// - it provided that this copyright notice is kept intact.                  -
// -                                                                         -
// - 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.  In no event shall -
// - the copyright holder be liable for any  direct, indirect, incidental or -
// - special damages arising in any way out of the use of this software.     -
// ---------------------------------------------------------------------------
// - copyright (c) 1999-2005 amaury darsch                                   -
// ---------------------------------------------------------------------------

#ifndef AFNIX_OPTIONS_HPP
#define AFNIX_OPTIONS_HPP

#ifndef  AFNIX_STRVEC_HPP
#include "Strvec.hpp"
#endif

namespace afnix {

  /// The Options class is the class used by the afnix clients to parse and 
  /// and store user options. The options are later used by the afnix engine.
  /// @author amaury darsch

  class Options {
  private:
    /// the argument list
    Strvec d_argv;
    /// the paths list
    Strvec d_path;
    /// the optional file name
    String d_fname;
    /// the assert flag
    bool d_assert;
    /// the initial path flag
    bool d_noipth;

  public:
    /// Create a new option class from the main arguments
    /// @param argc the number of arguments
    /// @param argv the argument array
    Options (int argc, char** argv);

    /// @return the string vector of arguments
    const Strvec& getargs (void) const {
      return d_argv;
    }

    /// @return the string vector of paths
    const Strvec& getpath (void) const {
      return d_path;
    }

    /// @return the assert flag
    bool getassert (void) const {
      return d_assert;
    }

    /// @return the no initial path flag
    bool getnoipth (void) const {
      return d_noipth;
    }

    /// @return the optional file name
    String getfname (void) const {
      return d_fname;
    }

  private:
    // make the copy constructor private
    Options (const Options&);
    // make the assignment operator private
    Options& operator = (const Options&);
  };
}

#endif
