00001 /* Parameter boxen for Xconq. 00002 Copyright (C) 2004 Eric A, McDonald 00003 00004 Xconq is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation; either version 2, or (at your option) 00007 any later version. See the file COPYING. */ 00008 00009 #ifndef XCONQ_PARAMBOX_H 00010 #define XCONQ_PARAMBOX_H 00011 00012 /* Enumeration of parameter box types. */ 00013 enum ParamBoxType { 00014 PBOX_TYPE_NONE = 0, 00015 PBOX_TYPE_UNIT, /* unit.h */ 00016 PBOX_TYPE_UNIT_AT, /* unit.h */ 00017 PBOX_TYPE_UNIT_UNIT, /* unit.h */ 00018 PBOX_TYPE_UNIT_SIDE, /* unit.h */ 00019 PBOX_TYPE_UNIT_SIDE_SEERS, /* unit.h */ 00020 PBOX_TYPE_UNIT_UNIT_SEERS, /* unit.h */ 00021 PBOX_TYPE_SIDE, /* side.h */ 00022 PBOX_TYPE_COUNT /* (Always last. Not a type.) */ 00023 }; 00024 00025 /* Base struct for parameter boxen. */ 00026 /* (The parameter box is an alternative to using a function with 00027 an ellipsis and varargs. Having these "abbreviations" available can 00028 be more useful than parsing a varargs list. These are particularly 00029 helpful when used with predicate functions in search algorithms.) */ 00030 struct ParamBox { 00031 protected: 00032 ParamBoxType pboxtype; 00033 ParamBox() { pboxtype = PBOX_TYPE_NONE; } 00034 public: 00035 ParamBoxType get_type() { return pboxtype; } 00036 }; 00037 00038 #endif