cppwebenv.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:3k
源码类别:

生物技术

开发平台:

C/C++

  1. /*
  2.  * ===========================================================================
  3.  * PRODUCTION $Log: cppwebenv.cpp,v $
  4.  * PRODUCTION Revision 1000.1  2004/06/01 19:44:42  gouriano
  5.  * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.11
  6.  * PRODUCTION
  7.  * ===========================================================================
  8.  */
  9. #include <ncbi_pch.hpp>
  10. #include <ncbiconf.h>
  11. #if HAVE_NCBI_C
  12. #include "cppwebenv.hpp"
  13. #include <serial/serialimpl.hpp>
  14. #include <serial/serialasn.hpp>
  15. #include <asn.h>
  16. #include "twebenv.h"
  17. USING_NCBI_SCOPE;
  18. BEGIN_NAMED_ASN_STRUCT_INFO("Web-Env", Web_Env)
  19.     ADD_ASN_MEMBER(arguments, SetOf)->SetOptional();
  20.     ADD_ASN_MEMBER(db_Env, SetOf)->SetOptional();
  21.     ADD_ASN_MEMBER(queries, SequenceOf)->SetOptional();
  22. END_ASN_STRUCT_INFO
  23. BEGIN_NAMED_ASN_STRUCT_INFO("Db-Env", Db_Env)
  24.     ADD_STD_MEMBER(name);
  25.     ADD_ASN_MEMBER(arguments, SetOf)->SetOptional();
  26.     ADD_ASN_MEMBER(filters, SetOf)->SetOptional();
  27. //    ADD_ASN_MEMBER(clipboard, Sequence)->SetOptional();
  28. END_ASN_STRUCT_INFO
  29. BEGIN_ASN_STRUCT_INFO(Argument)
  30.     ADD_STD_MEMBER(name);
  31.     ADD_STD_MEMBER(value);
  32. END_ASN_STRUCT_INFO
  33. BEGIN_NAMED_ASN_STRUCT_INFO("Query-History", Query_History)
  34.     ADD_STD_MEMBER(name)->SetOptional();
  35.     ADD_STD_MEMBER(seqNumber);
  36.     ADD_ASN_CHOICE_MEMBER(time, Time);
  37.     ADD_ASN_CHOICE_MEMBER(command, Query_Command);
  38. END_ASN_STRUCT_INFO
  39. BEGIN_NAMED_ASN_CHOICE_INFO("Query-Command", Query_Command)
  40.     ADD_ASN_CHOICE_VARIANT(search, Sequence, Query_Search);
  41.     ADD_ASN_CHOICE_VARIANT(select, Sequence, Query_Select);
  42.     ADD_ASN_CHOICE_VARIANT(related, Sequence, Query_Related);
  43. END_ASN_CHOICE_INFO
  44. BEGIN_NAMED_ASN_STRUCT_INFO("Query-Search", Query_Search)
  45.     ADD_STD_MEMBER(db);
  46.     ADD_STD_MEMBER(term);
  47.     ADD_STD_MEMBER(field)->SetOptional();
  48.     ADD_ASN_MEMBER(filters, SetOf)->SetOptional();
  49.     ADD_STD_MEMBER(count);
  50. ADD_STD_MEMBER(flags)->SetOptional();
  51. END_ASN_STRUCT_INFO
  52. BEGIN_NAMED_ASN_STRUCT_INFO("Query-Select", Query_Select)
  53.     ADD_STD_MEMBER(db);
  54.     ADD_ASN_MEMBER(items, Sequence);
  55. END_ASN_STRUCT_INFO
  56. BEGIN_ASN_CHOICE_INFO(Query_Related_items)
  57.     ADD_ASN_CHOICE_VARIANT(items, Sequence, Item_Set);
  58.     ADD_ASN_CHOICE_STD_VARIANT(itemCount, int);
  59. END_ASN_CHOICE_INFO
  60. BEGIN_NAMED_ASN_STRUCT_INFO("Query-Related", Query_Related)
  61.     ADD_ASN_CHOICE_MEMBER(base, Query_Command);
  62.     ADD_STD_MEMBER(relation);
  63.     ADD_STD_MEMBER(db);
  64.     ADD_NAMED_ASN_CHOICE_MEMBER("items", Items_items, Query_Related_items);
  65. END_ASN_STRUCT_INFO
  66. BEGIN_NAMED_ASN_STRUCT_INFO("Filter-Value", Filter_Value)
  67.     ADD_STD_MEMBER(name);
  68.     ADD_STD_MEMBER(value);
  69. END_ASN_STRUCT_INFO
  70. BEGIN_ASN_CHOICE_INFO(Time)
  71.     ADD_ASN_CHOICE_STD_VARIANT(unix, int);
  72.     ADD_ASN_CHOICE_VARIANT(full, Sequence, Full_Time);
  73. END_ASN_CHOICE_INFO
  74. BEGIN_NAMED_ASN_STRUCT_INFO("Full-Time", Full_Time)
  75.     ADD_STD_MEMBER(year);
  76.     ADD_STD_MEMBER(month);
  77.     ADD_STD_MEMBER(day);
  78.     ADD_STD_MEMBER(hour);
  79.     ADD_STD_MEMBER(minute);
  80.     ADD_STD_MEMBER(second);
  81. END_ASN_STRUCT_INFO
  82. BEGIN_NAMED_ASN_STRUCT_INFO("Item-Set", Item_Set)
  83.     ADD_ASN_MEMBER(items, OctetString);
  84.     ADD_STD_MEMBER(count);
  85. END_ASN_STRUCT_INFO
  86. #endif