HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_CvexDataCommand.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Side Effects Software Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef __HUSD_CvexDataCommand__
19 #define __HUSD_CvexDataCommand__
20 
21 #include "HUSD_API.h"
22 
23 #include <UT/UT_UniquePtr.h>
24 #include <VEX/VEX_PodTypes.h>
25 
26 class HUSD_TimeCode;
27 class HUSD_AutoWriteLock;
28 
29 template <VEX_Precision PREC> class VEX_GeoCommandQueue;
30 template <typename T> class UT_Array;
31 
32 
33 /// Specify the VEX runtime precision for HUSD execution of VEX programs.
34 static constexpr VEX_Precision HUSD_VEX_PREC = VEX_64;
35 
36 
37 /// Abstracts the object that handles USD VEX edit functions that submitted
38 /// the stage modificaiton requests with it.
40 {
41 public:
42  /// Creates the cvex code object given the string and its meaning.
44  virtual ~HUSD_CvexDataCommand();
45 
46  /// Applies the commands from the queue.
47  virtual void apply(HUSD_AutoWriteLock &writelock,
48  const HUSD_TimeCode &time_code) = 0;
49 
50  /// Sets the number of command queues, usually one for each thread.
51  void setCommandQueueCount( int count );
52  int getCommandQueueCount() const;
53 
54  /// Returns the vex data command queue (ie, usd data edit requests).
55  VEX_GeoCommandQueue<HUSD_VEX_PREC> &getCommandQueue( int index );
56 
57 private:
58  // Note, using unique ptr to avoid include bloat in the header.
60 };
61 
62 #endif
63 
VEX_Precision
Definition: VEX_PodTypes.h:25
constexpr VEX_Precision VEX_64
Definition: VEX_PodTypes.h:31
#define HUSD_API
Definition: HUSD_API.h:32
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
GLuint index
Definition: glcorearb.h:786
GLint GLsizei count
Definition: glcorearb.h:405