OpenVDB: Functions.h Source File

OpenVDB 8.1.0

Functions.h
Go to the documentation of this file.
1 // Copyright Contributors to the OpenVDB Project
2 // SPDX-License-Identifier: MPL-2.0
3
12
13 #ifndef OPENVDB_AX_CODEGEN_GENERIC_FUNCTIONS_HAS_BEEN_INCLUDED
14 #define OPENVDB_AX_CODEGEN_GENERIC_FUNCTIONS_HAS_BEEN_INCLUDED
15
16 #include "FunctionRegistry.h"
17
18 #include "../compiler/CompilerOptions.h"
19
20 #include <openvdb/version.h>
21
22 namespace openvdb {
23 OPENVDB_USE_VERSION_NAMESPACE
24 namespace OPENVDB_VERSION_NAME {
25
26 namespace ax {
27 namespace codegen {
28
33 inline FunctionRegistry::UniquePtr createDefaultRegistry(const FunctionOptions* op = nullptr);
34
41 void insertStandardFunctions(FunctionRegistry& reg, const FunctionOptions* options = nullptr);
42
48 void insertVDBPointFunctions(FunctionRegistry& reg, const FunctionOptions* options = nullptr);
49
55 void insertVDBVolumeFunctions(FunctionRegistry& reg, const FunctionOptions* options = nullptr);
56
57
60
61
62 inline FunctionRegistry::UniquePtr createDefaultRegistry(const FunctionOptions* op)
63 {
64 FunctionRegistry::UniquePtr registry(new FunctionRegistry);
65 insertStandardFunctions(*registry, op);
66 insertVDBPointFunctions(*registry, op);
67 insertVDBVolumeFunctions(*registry, op);
68 return registry;
69 }
70
71 } // namespace codegen
72 } // namespace ax
73 } // namespace OPENVDB_VERSION_NAME
74 } // namespace openvdb
75
76 #endif // OPENVDB_AX_CODEGEN_GENERIC_FUNCTIONS_HAS_BEEN_INCLUDED
77
FunctionRegistry.h
Contains the global function registration definition which described all available user front end fun...
openvdb::v8_1::ax::codegen::FunctionRegistry
The function registry which is used for function code generation. Each time a function is visited wit...
Definition: FunctionRegistry.h:37
openvdb::v8_1::ax::codegen::FunctionRegistry::UniquePtr
std::unique_ptr< FunctionRegistry > UniquePtr
Definition: FunctionRegistry.h:41
openvdb::v8_1::ax::codegen::createDefaultRegistry
FunctionRegistry::UniquePtr createDefaultRegistry(const FunctionOptions *op=nullptr)
Creates a registry with the default set of registered functions including math functions,...
Definition: Functions.h:62
openvdb::v8_1::ax::codegen::insertVDBPointFunctions
void insertVDBPointFunctions(FunctionRegistry &reg, const FunctionOptions *options=nullptr)
Populates a function registry with all available OpenVDB Point AX library function.
openvdb::v8_1::ax::codegen::insertStandardFunctions
void insertStandardFunctions(FunctionRegistry &reg, const FunctionOptions *options=nullptr)
Populates a function registry with all available "standard" AX library function. This primarily consi...
openvdb::v8_1::ax::codegen::insertVDBVolumeFunctions
void insertVDBVolumeFunctions(FunctionRegistry &reg, const FunctionOptions *options=nullptr)
Populates a function registry with all available OpenVDB Volume AX library function.
openvdb
Definition: openvdb/Exceptions.h:13
openvdb::v8_1::ax::FunctionOptions
Options that control how functions behave.
Definition: CompilerOptions.h:25
OPENVDB_VERSION_NAME
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:116
OPENVDB_USE_VERSION_NAMESPACE
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:178