HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
command.h
Go to the documentation of this file.
1 //
2 // Copyright 2021 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_IMAGING_HD_COMMAND_H
25 #define PXR_IMAGING_HD_COMMAND_H
26 
27 #include "pxr/pxr.h"
28 
29 #include "pxr/imaging/hd/api.h"
30 
31 #include "pxr/base/vt/dictionary.h"
32 #include "pxr/base/vt/value.h"
33 
34 #include "pxr/base/tf/token.h"
35 
36 #include <vector>
37 
39 
40 /// \class HdCommandArgDescriptor
41 ///
42 /// A bundle of state describing an argument to a command. See \c
43 /// HdCommandDescriptor for more information about commands.
44 ///
46 {
48 
50  const VtValue &defaultValue_)
51  : argName(argName)
52  , defaultValue(defaultValue_)
53  {}
54 
55  ///
56  /// The name of the argument
57  ///
59 
60  ///
61  /// Default value for this argument
62  ///
64 };
65 
66 using HdCommandArgDescriptors = std::vector<HdCommandArgDescriptor>;
67 
68 ///
69 /// Command arguments are a map of tokens to values
70 ///
72 
73 /// \class HdCommandDescriptor
74 ///
75 /// A bundle of state describing a "command". A command is simply a token
76 /// that can be invoked and delivered to the render delegate.
77 ///
79 {
81 
83  const TfToken &name_,
84  const std::string &description_="",
86  : commandName(name_)
87  , commandDescription(description_)
88  , commandArgs(args_)
89  {}
90 
91  ///
92  /// A token representing a command that can be invoked.
93  ///
95 
96  ///
97  /// A description of the command suitable for display in a UI for example.
98  ///
100 
101  ///
102  /// List of arguments this command supports, may be empty.
103  ///
105 
106 };
107 
108 using HdCommandDescriptors = std::vector<HdCommandDescriptor>;
109 
110 
112 
113 #endif // PXR_IMAGING_HD_COMMAND_H
const HdCommandArgDescriptors commandArgs
Definition: command.h:104
const VtValue defaultValue
Definition: command.h:63
const TfToken commandName
Definition: command.h:94
Definition: token.h:87
std::vector< HdCommandDescriptor > HdCommandDescriptors
Definition: command.h:108
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
HdCommandArgDescriptor(const TfToken &argName, const VtValue &defaultValue_)
Definition: command.h:49
std::vector< HdCommandArgDescriptor > HdCommandArgDescriptors
Definition: command.h:66
const TfToken argName
Definition: command.h:58
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
const std::string commandDescription
Definition: command.h:99
HdCommandDescriptor(const TfToken &name_, const std::string &description_="", const HdCommandArgDescriptors &args_=HdCommandArgDescriptors())
Definition: command.h:82
Definition: value.h:168