HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_SceneDoctor.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
7 
8 #ifndef DEV_HUSD_SCENEDOCTOR_H
9 #define DEV_HUSD_SCENEDOCTOR_H
10 
11 #include "HUSD_API.h"
12 #include "HUSD_FindPrims.h"
13 #include "HUSD_Path.h"
14 #include <PY/PY_CompiledCode.h>
15 #include <UT/UT_Array.h>
17 
19 {
20 public:
22  {
23  UNDEFINED = -1,
24  // kind
25  PARENT_PRIM_IS_NONE_KIND = 0,
26  COMPONENT_HAS_MODEL_CHILD = 1,
27  SUBCOMPONENT_HAS_MODEL_CHILD = 2,
28  // gprims
29  GPRIM_TYPE_HAS_CHILD = 3,
30  // primvar
31  PRIMVAR_ARRAY_LENGTH_MISMATCH = 4,
32  INTERPOLATION_TYPE_MISMATCH = 5,
33  PRIM_ARRAY_LENGTH_MISMATCH = 6,
34  INVALID_PRIMVAR_INDICES = 7,
35  // value clips
36  MISSING_VALUECLIP_MANIFEST = 8,
37  // python
38  PYTHON_EXCEPTION = 9,
39  };
41  {
44  ValidationError(HUSD_Path path, int errorState)
45  : myPath{path}, myErrorState{errorState} {}
46  bool operator<(const ValidationError &message) const
47  { return myPath < message.myPath; }
48  bool operator==(const ValidationError &message) const
49  { return myPath == message.myPath; }
50  };
52  {
53  bool myValidateKind = false;
54  bool myValidateGprims = false;
55  bool myValidatePrimvars = false;
56  bool myValidateValueClips = false;
57  };
60  void validate(UT_Array<ValidationError> &errors, const HUSD_FindPrims *prims);
61  bool validatePython(const HUSD_FindPrims *validationPrims,
62  const HUSD_FindPrims *collectionPrim,
63  const UT_String &collectionName,
64  PY_CompiledCode &pyExpr);
65 private:
66  HUSD_AutoAnyLock &myLock;
67  ValidationFlags myFlags;
68  UT_Array<ValidationError> myValidationErrors;
69 };
70 
71 #endif // DEV_HUSD_SCENEDOCTOR_H
GLuint GLsizei const GLchar * message
Definition: glcorearb.h:2543
GLbitfield flags
Definition: glcorearb.h:1596
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
#define HUSD_API
Definition: HUSD_API.h:32
ValidationError(HUSD_Path path, int errorState)
bool operator==(const ValidationError &message) const
bool operator<(const ValidationError &message) const