1. PRO rhumba, geom
  2.  
  3. ; let us assume that all the caller instances are defined
  4. ; although they will all be supplied to the generator
  5.  
  6. objectType = 'GRID'
  7. geom = 'LINESEGMENT'
  8. cellContents = '[(I) (V) (X) (L) (C) (D) (M)]' ; we will take this as a string,
  9. ; and find ensembles
  10. command = 'CONSTRUCT' ; this is very important
  11. outputTarg = 'r' ; object name is the output name
  12.  
  13.  
  14.  
  15. ;the actual objects
  16.  
  17.  
  18. CASE command OF
  19. "CONSTRUCT" : BEGIN
  20. print, "constructing ", outputTarg
  21. CASE objectType OF
  22. "GRID" : BEGIN
  23. print, "object is a grid"
  24. ;print, "expecting either cell content (automatic indexing) or"
  25. ;print, "cell indices as an array"
  26.  
  27. IF (N_Elements(cellIndices) NE 0) THEN BEGIN
  28. print, "cell indices given"
  29. ENDIF
  30. IF (N_Elements(cellContents) NE 0) THEN BEGIN
  31. print, "cell contents given"
  32. ;to ease up operations
  33. ;consider also the geometry
  34. CASE geom OF
  35. "LINESEGMENT" : BEGIN
  36. print, "creating 1D array like a line segment"
  37. outputObj = obj_new('automaticSystem')
  38. outputObj->makeGrid, [3,2]
  39. ;print , outputObj->grid
  40. END
  41. ENDCASE
  42. ENDIF
  43. IF ((N_Elements(cellIndices) EQ 0) && ( N_Elements(cellContents) EQ 0)) THEN BEGIN
  44. print, "failed"
  45. ENDIF
  46. END
  47. ENDCASE
  48. END
  49.  
  50. "READ" : BEGIN
  51.  
  52. END
  53.  
  54.  
  55.  
  56. "PUT" : BEGIN
  57.  
  58. END
  59.  
  60.  
  61.  
  62. "TRIGGER" : BEGIN
  63.  
  64. END
  65.  
  66.  
  67. ENDCASE
  68.  
  69.  
  70. END