Loading...
Searching...
No Matches
registerSchema.h
Go to the documentation of this file.
1//
2// Copyright 2025 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_EXEC_EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_H
8#define PXR_EXEC_EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_H
9
11
12#include "pxr/pxr.h"
13
15#include "pxr/exec/exec/types.h"
16
18#include "pxr/base/tf/type.h"
19
20PXR_NAMESPACE_OPEN_SCOPE
21
22// Generates a schema computation registration function name.
23//
25#define _EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_NAME(SchemaType) Exec_RegisterSchema_##SchemaType
27
42#define EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA(SchemaType) \
43 \
44 PXR_NAMESPACE_OPEN_SCOPE \
45 \
46 /* Putting the registration fuction in the same namespace as the input */ \
47 /* classes/functions makes it so we can use unadorned names for the */ \
48 /* arguments to .Inputs(), etc. */ \
49 namespace exec_registration { \
50 /* Forward declaration of the static registration function. */ \
51 static void _EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_NAME(SchemaType) ( \
52 PXR_NS::Exec_ComputationBuilder &self); \
53 } \
54 \
55 /* The registry function calls the schema computation registration */ \
56 /* function. */ \
57 TF_REGISTRY_FUNCTION(ExecDefinitionRegistryTag) { \
58 Exec_ComputationBuilder self = \
59 Exec_ComputationBuilder::ConstructionAccess::Construct( \
60 TfType::FindByName(#SchemaType)); \
61 PXR_NS::exec_registration::_EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_NAME(SchemaType)( \
62 self); \
63 } \
64 \
65 PXR_NAMESPACE_CLOSE_SCOPE \
66 \
67 /* Define the schema computation registration function. The body of the */ \
68 /* function is provided by the client code that calls this macro. */ \
69 static void \
70 PXR_NS::exec_registration::_EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_NAME(SchemaType) ( \
71 PXR_NS::Exec_ComputationBuilder &self)
72
73PXR_NAMESPACE_CLOSE_SCOPE
74
75#endif
This is a public header, but many of the symbols have private names because they are not intended for...
This file contains definitions for trivial types, including type aliases, so that source files that r...