home *** CD-ROM | disk | FTP | other *** search
/ ftptest.leeds.ac.uk / 2015.02.ftptest.leeds.ac.uk.tar / ftptest.leeds.ac.uk / bionet / CAE-GROUP / SCL-WIN3x / SCLTEST.EXE / EXP / SDAI_INI.CPP < prev    next >
C/C++ Source or Header  |  1994-12-13  |  3KB  |  93 lines

  1. #ifndef  SDAI_INI_CPP
  2. #define  SDAI_INI_CPP
  3. // This file was generated by fedex_plus.  You probably don't want to edit
  4. // it since your modifications will be lost if fedex_plus is used to
  5. // regenerate it.
  6. /* $Id$ */
  7. #ifndef  S_SCHEMA_H 
  8. #include <s_schema.h> 
  9. #endif 
  10. #include <Registry.h>
  11. Registry& DescribeOtherTypes(Registry& reg);
  12.  
  13. Registry& DoEntities(Registry& reg);
  14.  
  15. Registry& DoSelects(Registry& reg);
  16.  
  17. void 
  18. SdaiEXAMPLE_SCHEMAInit (Registry& reg)
  19. {
  20.     SchemaDescriptor *  s_example_schema = new SchemaDescriptor("Example_Schema");
  21.     reg.AddSchema (*s_example_schema);
  22.  
  23. /*    **************  TYPES      */
  24.     example_schemat_color = new TypeDescriptor (
  25.           "Color",    // Name
  26.           ENUM_TYPE,    // FundamentalType
  27.           "ENUMERATION of (red, green, blue, yellow, orange, white, black, brown)");    // Description
  28.     example_schemat_label = new TypeDescriptor (
  29.           "Label",    // Name
  30.           STRING_TYPE,    // FundamentalType
  31.           "STRING");    // Description
  32.     example_schemat_point = new TypeDescriptor (
  33.           "Point",    // Name
  34.           REAL_TYPE,    // FundamentalType
  35.           "REAL");    // Description
  36.     example_schemat_length_measure = new TypeDescriptor (
  37.           "Length_Measure",    // Name
  38.           REAL_TYPE,    // FundamentalType
  39.           "REAL");    // Description
  40.  
  41.     //    *****  Describe the Entities
  42.     example_schemae_poly_line = new EntityDescriptor("Poly_Line",s_example_schema,F, (Creator) create_SdaiPoly_line);
  43.     example_schemae_shape = new EntityDescriptor("Shape",s_example_schema,F, (Creator) create_SdaiShape);
  44.     example_schemae_rectangle = new EntityDescriptor("Rectangle",s_example_schema,F, (Creator) create_SdaiRectangle);
  45.     example_schemae_square = new EntityDescriptor("Square",s_example_schema,F, (Creator) create_SdaiSquare);
  46.     example_schemae_triangle = new EntityDescriptor("Triangle",s_example_schema,F, (Creator) create_SdaiTriangle);
  47.     example_schemae_circle = new EntityDescriptor("Circle",s_example_schema,F, (Creator) create_SdaiCircle);
  48.     example_schemae_line = new EntityDescriptor("Line",s_example_schema,F, (Creator) create_SdaiLine);
  49.     example_schemae_cartesian_point = new EntityDescriptor("Cartesian_Point",s_example_schema,F, (Creator) create_SdaiCartesian_point);
  50.  
  51.     DescribeOtherTypes(reg);
  52.  
  53.     DoEntities(reg);
  54.  
  55.     DoSelects(reg);
  56.  
  57. }
  58. Registry& DescribeOtherTypes(Registry& reg){
  59.     reg.AddType (*example_schemat_color);
  60.     example_schemat_label->ReferentType(t_STRING_TYPE);
  61.     reg.AddType (*example_schemat_label);
  62.     example_schemat_point->ReferentType(t_REAL_TYPE);
  63.     reg.AddType (*example_schemat_point);
  64.     example_schemat_length_measure->ReferentType(t_REAL_TYPE);
  65.     reg.AddType (*example_schemat_length_measure);
  66. return reg;
  67. }
  68.  
  69. //    ***** Add the TypeDescriptor's to the SELECT Types      
  70. Registry& DoSelects(Registry& reg){
  71. return reg;
  72. }
  73. Registry& DoEntities(Registry& reg){
  74. Registry& initpoly_line(Registry& reg);
  75. initpoly_line(reg);
  76. Registry& initshape(Registry& reg);
  77. initshape(reg);
  78. Registry& initrectangle(Registry& reg);
  79. initrectangle(reg);
  80. Registry& initsquare(Registry& reg);
  81. initsquare(reg);
  82. Registry& inittriangle(Registry& reg);
  83. inittriangle(reg);
  84. Registry& initcircle(Registry& reg);
  85. initcircle(reg);
  86. Registry& initline(Registry& reg);
  87. initline(reg);
  88. Registry& initcartesian_point(Registry& reg);
  89. initcartesian_point(reg);
  90. return reg;
  91. }
  92. #endif
  93.