HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CVEX_Function.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  * NAME: CVEX_Function.h ( CVEX Library, C++)
7  *
8  * COMMENTS: C++ interface to VEX. This class is used to hold
9  * a generated function.
10  */
11 
12 #ifndef __CVEX_Function__
13 #define __CVEX_Function__
14 
15 #include "CVEX_API.h"
16 #include "CVEX_Value.h" // for CVEX_Type
17 #include <UT/UT_IntrusivePtr.h>
18 
19 class VEX_Assemble;
21 class UT_StringArray;
22 template <typename T> class UT_Array;
23 
24 /// @brief A class holding a VEX function.
25 ///
26 /// This will be created by something like the CVEX_Context::preloadFunction.
27 /// It can then be passed directly to loadFunction() to be used rather
28 /// than going to the global vex context function table.
30 {
31 public:
32  CVEX_Function();
34  ~CVEX_Function();
35 
36  const CVEX_Function &operator=(const CVEX_Function &src);
37 
38  bool isValid() const { return myAssembly.get() != nullptr; }
39 
40  // Returns true if any export/import has this as a prefix.
41  bool hasParameterWithPrefix(const char *prefix);
42 
43  /// Returns the function parameters boundable by adding CVEX input.
44  bool getParameters(UT_StringArray &parm_names,
45  UT_Array<CVEX_Type> &parm_types,
46  UT_IntArray &parm_exports) const;
47 
48 private:
49  VEX_AssemblePtr myAssembly;
50  friend class CVEX_Context;
51 };
52 
53 #endif
54 
Call VEX from C++.
Definition: CVEX_Context.h:151
bool isValid() const
Definition: CVEX_Function.h:38
A class holding a VEX function.
Definition: CVEX_Function.h:29
#define CVEX_API
Definition: CVEX_API.h:10
GLenum src
Definition: glcorearb.h:1792