/*	PPVL_selections.h

This is an add-on to the PIRL Paramter Value Logic module.


Author:

Bradford Castalia                       Castalia@Arizona.edu
Senior Systems Analyst                  (520) 621-6946
Planetary Image Research Laboratory     (520) 621-4824
Department of Planetary Sciences        FAX: (520) 621-9628
University of Arizona                   Space Sciences Bldg.
1629 E. University Blvd.                Room 429
Tucson, Arizona  85721-0092

"Build an image in your mind, fit yourself into it."
    The log of Cyradis seeress of Kell.


SCCS ID: @(#)PPVL_selections.h	1.3 10/04/00
*/

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

Copyright (C) 2000  Bradford Castalia, University of Arizona

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.

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. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


Bradford Castalia                       Castalia@Arizona.edu
Senior Systems Analyst                  http://PIRL.LPL.Arizona.edu/~castalia
Planetary Image Research Laboratory     520-621-4824
Department of Planetary Sciences        FAX: 520-621-9628
University of Arizona                   Space Sciences Bldg.
1629 E. University Blvd.                Room 429
Tucson, Arizona  85721-0092

"Build an image in your mind, fit yourself into it."
    The Log of Cyradis, Seeress of Kell.

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

#ifndef _PPVL_selections_
#define _PPVL_selections_

#include	"PPVL.h"


typedef struct
	{
	char		*name;		/* Name of parameter to find */
	PPVL_Type	type;		/* Data type of value expected */
	int			count;		/* Number of values sought */
	void		*value;		/* Location of value storage */
	}
	PPVL_Parameter_Selections;

#define PPVL_PARAMETER_SELECTIONS_END \
	{NULL, 0, 0, NULL}

/*	Reports a problem parameter selection.
*/
extern PPVL_Parameter_Selections
	*PPVL_selections_error;


/*	String-value mapping.

	Providing a mapping between strings and values is a common need.
	This structure does that. The mapping direction may, of course,
	be from string to value, or vice versa. Strings may be compared
	as desired; e.g. strcmp, strcasecmp, strncmp, etc. The value is
	typed as a double to provide the greatest generality; it can
	always be cast down as appropriate.
*/
typedef struct
	{
	char		*string;
	double		value;
	}
	String_value_mapping;

#define PPVL_STRING_VALUE_MAPPING_END \
	{NULL, 0}


/*	Function declaration.
*/
int
PPVL_selections
	(
	PPVL_Parameter				*The_Aggregate,
	PPVL_Parameter_Selections	*The_Selections
	);


#endif
