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  CVEX_Function();
35  ~CVEX_Function();
36 
37  const CVEX_Function &operator=(const CVEX_Function &src);
38 
39  bool isValid() const { return myAssembly.get() != nullptr; }
40 
41  // Returns true if any export/import has this as a prefix.
42  bool hasParameterWithPrefix(const char *prefix);
43 
44  /// Returns the function parameters boundable by adding CVEX input.
45  bool getParameters(UT_StringArray &parm_names,
46  UT_Array<CVEX_Type> &parm_types,
47  UT_IntArray &parm_exports) const;
48 
49 private:
50  VEX_AssemblePtr myAssembly;
51  template <VEX_Precision ALLPREC>
52  friend class CVEX_ContextT;
53 };
54 
55 #endif
56 
GLenum src
Definition: glew.h:2410
bool isValid() const
Definition: CVEX_Function.h:39
A class holding a VEX function.
Definition: CVEX_Function.h:30
#define CVEX_API
Definition: CVEX_API.h:12
Call VEX from C++.
Definition: CVEX_Context.h:175