Main Page   Compound List   File List   Compound Members   File Members  

soarapi_datatypes.h

Go to the documentation of this file.
00001 
00010 #ifndef _SOARAPI_DATATYPES_H_           /* excludeFromBuildInfo */
00011 #define _SOARAPI_DATATYPES_H_
00012 
00013 #include "soarkernel.h"
00014 #include "sysdep.h"
00015 #include <stdarg.h>
00016 
00017 #define SOARRESULT_RESULT_LENGTH 256
00018 
00019 
00024 typedef struct soarResult_struct {
00025 
00026   char result[SOARRESULT_RESULT_LENGTH];
00027   int resultLength;
00028 
00029 } soarResult;
00030 
00031 
00032 #define init_soarResult(r) { \
00033  (r).resultLength = SOARRESULT_RESULT_LENGTH; \
00034  (*((r).result)) = '\0'; \
00035 } 
00036 
00037 #define clearSoarResultResult(r) (*((r)->result)) = '\0';
00038 
00039 #define setSoarResultResultStdError(r) (strcpy( ((r)->result),  "Error"));
00040 
00041 #ifdef USE_STDARGS
00042 extern void setSoarResultResult ( soarResult *res, const char *format, ...);
00043 #else
00044 extern void setSoarResultResult ();
00045 #endif
00046 
00047 
00048 
00049 #ifdef USE_STDARGS
00050 extern void appendSoarResultResult ( soarResult *res, const char *format, ...);
00051 #else
00052 extern void appendSoarResultResult ();
00053 #endif
00054 
00055 
00056 
00057 #ifdef USE_STDARGS
00058 extern void appendSymbolsToSoarResultResult ( soarResult *res, const char *format, ...);
00059 #else
00060 extern void appendSymbolsToSoarResultResult ();
00061 #endif
00062 
00063 
00064 
00073 typedef void * psoar_agent;
00074 
00075 
00084 typedef void * psoar_wme;
00085 
00086 
00087 /*
00088  * NOTE Documenting this struct seems to result in a who code section
00089  *  being generated... :(
00090  */
00091 
00100 typedef struct soar_apiAgentIter_struct {
00101 
00102   cons *_begin;    
00103   cons *_current;  
00104   bool  more;      
00106 }  soar_apiAgentIterator;
00107 
00108 
00109 
00114 enum soar_apiResult {
00115   SOAR_OK,
00116   SOAR_ERROR
00117 };
00118 
00119 
00120 /*
00121  * \brief  A production type
00122  *
00123  */
00124 enum soar_apiProductionType {
00125   CHUNKS,
00126   DEFAULT,
00127   TASK,
00128   USER,
00129   ALL
00130 };
00131 
00132 /*
00133  * \brief  The agent's learning setting
00134  *
00135  */
00136 enum soar_apiLearningSetting {
00137   ON,
00138   OFF,
00139   EXCEPT,
00140   ONLY,
00141   ALL_LEVELS,
00142   BOTTOM_UP
00143 };
00144 
00145 
00146 /*
00147  * \brief  The slot type
00148  *
00149  */
00150 enum soar_apiSlotType {
00151   NO_SLOT,
00152   STATE_SLOT,
00153   OPERATOR_SLOT,
00154   SUPERSTATE_SLOT,
00155   SUPEROPERATOR_SLOT,
00156   SUPERSUPERSTATE_SLOT,
00157   SUPERSUPEROPERATOR_SLOT
00158 };
00159 
00160 
00165 typedef struct ask_cb_data_st {
00166   
00167   preference **selection;
00168   preference *candidates;
00169 
00170 } soar_apiAskCallbackData;
00171 
00172 typedef struct sapiwme_st {
00173   char *id;
00174   char *attr;
00175   char *value;
00176   long timetag;
00177 } soarapi_wme;
00178 
00179 
00180 
00181 
00182 
00183 #endif
00184 
00185 
00186 
00187 
00188 

Generated at Wed Aug 8 09:49:32 2001 for The Soar Application Programming Interface by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001