occonstraints.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
  2. See the COPYRIGHT file for more information. */
  3. #ifndef CONSTRAINTS_H
  4. #define CONSTRAINTS_H 1
  5. /*! Specifies an OCslice. */
  6. typedef struct OCslice {
  7. size_t first;
  8. size_t count;
  9. size_t stride;
  10. size_t stop; /* == first + count */
  11. size_t declsize; /* from defining dimension, if any.*/
  12. } OCslice;
  13. /*! Specifies a form of path where each element can have a set of associated indices */
  14. typedef struct OCpath {
  15. OClist* names;
  16. OClist* indexsets; /* oclist<oclist<Slice>> */
  17. } OCpath;
  18. /*! Specifies a ProjectionClause. */
  19. typedef struct OCprojectionclause {
  20. char* target; /* "variable name" as mentioned in the projection */
  21. OClist* indexsets; /* oclist<oclist<OCslice>> */
  22. struct OCnode* node; /* node with name matching target, if any. */
  23. int gridconstraint; /* used only for testing purposes */
  24. } OCprojectionclause;
  25. /*! Selection is the node type for selection expression trees */
  26. typedef struct OCselectionclause {
  27. int op;
  28. char* value;
  29. struct OCselectionclause* lhs;
  30. OClist* rhs;
  31. } OCselectionclause;
  32. #endif /*CONSTRAINTS_H*/