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
19PXR_NAMESPACE_OPEN_SCOPE
20
21// Generates a schema computation registration function name.
22//
24#define _EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_NAME(SchemaType) Exec_RegisterSchema_##SchemaType
26
41#define EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA(SchemaType) \
42 \
43 PXR_NAMESPACE_OPEN_SCOPE \
44 \
45 /* Putting the registration fuction in the same namespace as the input */ \
46 /* classes/functions makes it so we can use unadorned names for the */ \
47 /* arguments to .Inputs(), etc. */ \
48 namespace exec_registration { \
49 /* Forward declaration of the static registration function. */ \
50 static void _EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_NAME(SchemaType) ( \
51 PXR_NS::ExecComputationBuilder &self); \
52 } \
53 \
54 /* The registry function calls the schema computation registration */ \
55 /* function. */ \
56 TF_REGISTRY_FUNCTION(ExecDefinitionRegistryTag) { \
57 ExecComputationBuilder self = \
58 ExecComputationBuilder::ConstructionAccess::Construct(#SchemaType); \
59 PXR_NS::exec_registration::_EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_NAME( \
60 SchemaType)(self); \
61 } \
62 \
63 PXR_NAMESPACE_CLOSE_SCOPE \
64 \
65 /* Define the schema computation registration function. The body of the */ \
66 /* function is provided by the client code that calls this macro. */ \
67 static void \
68 PXR_NS::exec_registration::_EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA_NAME( \
69 SchemaType)(PXR_NS::ExecComputationBuilder &self)
70
71PXR_NAMESPACE_CLOSE_SCOPE
72
73#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...