#ifndef _action_h_
#define _action_h_

#include "sysdep.h"
#include "verb.h"
#include "darray.h"

typedef struct AlAction_st *AlAction;

#ifdef __STDC__
extern AlAction AlAction_create(AlVerb, Darray);
extern AlVerb AlAction_verb(AlAction);
extern Darray AlAction_args(AlAction);
extern NORET AlAction_destroy(AlAction);
extern AlAction AlAction_copy(AlAction);
#else
extern AlAction AlAction_create();
extern AlVerb AlAction_verb();
extern Darray AlAction_args();
extern NORET AlAction_destroy();
extern AlAction AlAction_copy();
#endif /* __STDC__ */

/* 
 * AlAction_create(verb, args)
 * Creates and returns an action object.  The number of args (length 
 * of the Darray passed as args) must be within the range specified 
 * by AlVerb.  Each arg is a string.  The args Darray is copied to 
 * private storage, as are all the strings contained in it.
 * 
 * AlAction_verb(action)
 * Returns the verb part of the action.
 *
 * AlAction_args(action)
 * Returns the args part of the action.  The darray returned should not
 * be modified (or destroyed, etc), nor should it be referenced after the
 * action object is destroyed.
 *
 * AlAction_destroy(action)
 * Destroys the action object and frees all resources associated with it.
 * 
 * AlAction_copy(action)
 * Returns a copy of action, which does not share storage for the args.
 * The verb is always shared.
 */

#endif /* ifndef _action_h_ */
