queue_proto.h 2.76 KB
/**
 * \file scot/queue_proto.h
 * \author  Georg Steffers <georg@steffers.org>
 * \brief   This generates all prototypes needed for queues based on
 *          typesafe lists.
 *
 * This combines the macro definitions in \link scot/queue_type_proto.h 
 * scot/queue_type_proto.h \endlink and \link scot/queue_func_proto.h 
 * scot/queue_func_proto.h \endlink.
 * Additionally defines for all errornumbers that queue will create can be
 * found here.
 * GEN_QUEUE_PROTO is normally called in a header file that describes a 
 * new Datatype and also wants lists of it.
 * By doing this the complete interface to lists of that datatype is
 * produced.
 *
 * Copyright (C)2006    Georg Steffers <georg@steffers.org>
 * 
 * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
#ifndef  QUEUE_PROTO_H
#define  QUEUE_PROTO_H

#include <scot/queue_type_proto.h>
#include <scot/queue_func_proto.h>

/** 
 * \brief errnum if queue is empty 
 * \attention This is actually not use and will probably never be used
 * in this form.
 */
#define  QUEUE_EMPTY         0


/**
 * \param   type     the datatype that this list code should handle.
 * \pre              Type must be a single word typename. If one wants
 *                   to use e.g. lists of structs one has to use typedef
 *                   to create a single word type name like this:
 *                   typedef struct mystruct_t mystruct_t;
 *                   GEN_LIST_PROTO(type) should have been called previous
 *                   to this call.
 * \return           Nothing
 * \post             The typedefs, struct declaration and function prototypes
 *                   for functions to queues based on lists for the given 
 *                   datatype are generated within the calling build file.
 *
 * \brief this creates all typdefs, declarations and prototypes needed for a
 *        queue based on typesafe list of a given \a type. 
 *        This is normally calles within a header file.
 */
#define  GEN_QUEUE_PROTO(type)                                       \
   GEN_QUEUE_TYPE_PROTO (type)                                       \
   GEN_QUEUE_FUNC_PROTO (type)

#endif   /* QUEUE_PROTO_H */