HDK
|
#include <UT_Options.h>
Public Types | |
enum | UT_OptionsReferenceType { REFERENCE } |
![]() | |
typedef UT_Options | value_type |
enum | UT_OptionsSentinelType { SENTINEL } |
Static Public Attributes | |
static const UT_OptionsHolder | theEmptyOptions |
static const UT_OptionsHolder | theSentinel |
Friends | |
void | swap (UT_OptionsHolder &a, UT_OptionsRef &b) |
void | swap (UT_OptionsHolder &a, UT_OptionsHolder &b) |
Additional Inherited Members | |
![]() | |
static const UT_Options & | emptyOptions () |
Definition at line 994 of file UT_Options.h.
UT_OptionsHolder can be constructed with UT_OptionsHolder::REFERENCE to create a shallow reference to the const char *.
Enumerator | |
---|---|
REFERENCE |
Definition at line 999 of file UT_Options.h.
|
inline |
Definition at line 1002 of file UT_Options.h.
|
inline |
Will make a copy of the provided options.
Definition at line 1009 of file UT_Options.h.
|
inline |
Will make a shallow reference.
Definition at line 1020 of file UT_Options.h.
|
inline |
Makes a shallow reference to the contents of the UT_OptionsRef.
Definition at line 1027 of file UT_Options.h.
UT_OptionsHolder::UT_OptionsHolder | ( | const UT_OptionsRef & | ref | ) |
Makes a deep copy of the provided UT_OptionsRef. This constructor is not marked explicit since we often want this conversion (e.g. when inserting a UT_OptionsRef into a UT_OptionsMap, as with the const char* constructor).
|
inlineexplicit |
Construct as a sentinel value.
Definition at line 1040 of file UT_Options.h.
|
inline |
Makes a copy of the provided options.
Definition at line 1047 of file UT_Options.h.
|
inlinenoexcept |
Move constructor. Steals the working data from the original.
Definition at line 1054 of file UT_Options.h.
|
inline |
Returns a writeable UT_Options which will modify the contents of this options holder. When this is copied or deleted, the returned pointer must not be used any more. (Ideally we could erase ourself and return a UniquePtr for correct life time, but we can't steal from a shared pointer)
Use update() whereever possible instead as it is much safer.
Definition at line 1100 of file UT_Options.h.
|
inline |
Makes a bit-wise copy of the options and adjust the reference count.
Definition at line 1061 of file UT_Options.h.
|
inline |
Move the contents of about-to-be-destructed options s to this options.
Definition at line 1070 of file UT_Options.h.
|
inline |
Definition at line 1077 of file UT_Options.h.
|
inline |
Definition at line 1083 of file UT_Options.h.
Updates the contents of this option, first making sure it is unique. The provided operator should take a reference to a UT_Options that it will update. UT_OptionsHolder value; value.update([](UT_Options &opt) { opt.setOptionS("test", "bar"); });
Definition at line 1122 of file UT_Options.h.
|
friend |
Friend specialization of std::swap() to use UT_OptionsHolder::swap()
Definition at line 1130 of file UT_Options.h.
|
friend |
Friend specialization of std::swap() to use UT_OptionsHolder::swap()
Definition at line 1131 of file UT_Options.h.
|
static |
In some functions it's nice to be able to return a const-reference to a UT_OptionsHolder. However, in error cases, you likely want to return an empty options. This would mean that you'd have to return a real UT_OptionsHolder (not a const reference). This static lets you return a reference to an empty options.
Definition at line 1139 of file UT_Options.h.
|
static |
Definition at line 1141 of file UT_Options.h.