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 template <VEX_Precision PREC> class CVEX_ContextT;
24 
25 /// @brief A class holding a VEX function.
26 ///
27 /// This will be created by something like the CVEX_Context::preloadFunction.
28 /// It can then be passed directly to loadFunction() to be used rather
29 /// than going to the global vex context function table.
31 {
32 public:
33  // Note we can't have rule-of-zero as we've not declared
34  // VEX_Assemble here.
35  CVEX_Function();
38  ~CVEX_Function();
41 
42  bool isValid() const { return myAssembly.get() != nullptr; }
43 
44  // Returns true if any export/import has this as a prefix.
45  bool hasParameterWithPrefix(const char *prefix);
46 
47  /// Returns the function parameters boundable by adding CVEX input.
48  bool getParameters(UT_StringArray &parm_names,
49  UT_Array<CVEX_Type> &parm_types,
50  UT_IntArray &parm_exports) const;
51 
52 private:
53  VEX_AssemblePtr myAssembly;
54  template <VEX_Precision ALLPREC>
55  friend class CVEX_ContextT;
56 };
57 
58 #endif
59 
bool isValid() const
Definition: CVEX_Function.h:42
A class holding a VEX function.
Definition: CVEX_Function.h:30
LeafData & operator=(const LeafData &)=delete
#define CVEX_API
Definition: CVEX_API.h:12
Call VEX from C++.
Definition: CVEX_Context.h:203
GLenum src
Definition: glcorearb.h:1793