home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 02 Useful Techniques / 08 Zarozinski / src / ffllapi / FFLLAPI.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-11-13  |  1.6 KB  |  51 lines

  1. //
  2. // File:        FFLLAPI.h    
  3. //
  4. // Purpose:        This file contains the API declarations for FFLL
  5. //
  6. // Copyright ⌐ 2001 Louder Than A Bomb! Software
  7. //
  8. // This file is part of the FFLL (Free Fuzzy Logic Library) project (http://ffll.sourceforge.net)
  9. // It is released under the BSD license, see http://ffll.sourceforge.net/license.txt for the full text.
  10. //
  11.  
  12. #ifndef _FFLLAPI_H
  13. #define _FFLLAPI_H
  14.  
  15. #include <stddef.h>
  16.  
  17. // Official API
  18. // NOTE: we don't use __declspec(dllexport) (FFLL_API #define) to export, we use a .def file as that is
  19. // the most generic way and avoids any name mangling (or decoration) via aliases
  20. // (MSVC mangles names EVEN with 'extern "C"' if calling convention is __stdcall) and allows
  21. // us to explicitly state the ordinal to avoid version conflicts in the future.
  22.  
  23. // define which version's we call if _UNICODE
  24.  
  25. #ifdef _UNICODE
  26. #    define ffll_get_msg_text        ffll_get_msg_textW
  27. #else
  28. #    define ffll_get_msg_text        ffll_get_msg_textA
  29. #endif // unicode
  30.  
  31. extern "C"
  32. {
  33. // API for creating a FFLL model
  34.  
  35. int __stdcall ffll_new_model() ;
  36. int __stdcall ffll_close_model(int model_idx) ;
  37. int __stdcall ffll_new_child(int model_idx) ;
  38. int __stdcall ffll_load_fcl_file(int model_idx, const char* file); 
  39.  
  40.  
  41. const wchar_t* __stdcall ffll_get_msg_textW(int model_idx);
  42. const char* __stdcall ffll_get_msg_textA(int model_idx);
  43.  
  44. // thread specific functions...
  45.  
  46. int __stdcall ffll_set_value(int model_idx, int child_idx, int var_idx, double value);
  47. double __stdcall ffll_get_output_value(int model_idx, int child_idx);
  48.  
  49. } // end extern "C" for FFLL api
  50.   
  51. #endif // _FFLLAPI_H