All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
command.h
1//
2// Copyright 2021 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_IMAGING_HD_COMMAND_H
8#define PXR_IMAGING_HD_COMMAND_H
9
10#include "pxr/pxr.h"
11
12#include "pxr/imaging/hd/api.h"
13
15#include "pxr/base/vt/value.h"
16
17#include "pxr/base/tf/token.h"
18
19#include <vector>
20
21PXR_NAMESPACE_OPEN_SCOPE
22
29{
31
33 const VtValue &defaultValue_)
35 , defaultValue(defaultValue_)
36 {}
37
42
47};
48
49using HdCommandArgDescriptors = std::vector<HdCommandArgDescriptor>;
50
55
62{
64
65 explicit HdCommandDescriptor(
66 const TfToken &name_,
67 const std::string &description_="",
68 const HdCommandArgDescriptors &args_=HdCommandArgDescriptors())
69 : commandName(name_)
70 , commandDescription(description_)
71 , commandArgs(args_)
72 {}
73
78
82 const std::string commandDescription;
83
87 const HdCommandArgDescriptors commandArgs;
88
89};
90
91using HdCommandDescriptors = std::vector<HdCommandDescriptor>;
92
93
94PXR_NAMESPACE_CLOSE_SCOPE
95
96#endif // PXR_IMAGING_HD_COMMAND_H
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
A map with string keys and VtValue values.
Definition: dictionary.h:43
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
A bundle of state describing an argument to a command.
Definition: command.h:29
const TfToken argName
The name of the argument.
Definition: command.h:41
const VtValue defaultValue
Default value for this argument.
Definition: command.h:46
A bundle of state describing a "command".
Definition: command.h:62
const std::string commandDescription
A description of the command suitable for display in a UI for example.
Definition: command.h:82
const TfToken commandName
A token representing a command that can be invoked.
Definition: command.h:77
const HdCommandArgDescriptors commandArgs
List of arguments this command supports, may be empty.
Definition: command.h:87
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...