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 1090 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 1095 of file UT_Options.h.
|
inline |
Definition at line 1098 of file UT_Options.h.
|
inline |
Will make a copy of the provided options.
Definition at line 1105 of file UT_Options.h.
|
inline |
Definition at line 1115 of file UT_Options.h.
|
inline |
Will make a shallow reference.
Definition at line 1123 of file UT_Options.h.
|
inline |
Makes a shallow reference to the contents of the UT_OptionsRef.
Definition at line 1130 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 1143 of file UT_Options.h.
|
inline |
Makes a copy of the provided options.
Definition at line 1150 of file UT_Options.h.
|
inlinenoexcept |
Move constructor. Steals the working data from the original.
Definition at line 1157 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 1203 of file UT_Options.h.
|
inline |
Makes a bit-wise copy of the options and adjust the reference count.
Definition at line 1164 of file UT_Options.h.
|
inline |
Move the contents of about-to-be-destructed options s to this options.
Definition at line 1173 of file UT_Options.h.
|
inline |
Definition at line 1180 of file UT_Options.h.
|
inline |
Definition at line 1186 of file UT_Options.h.
|
inline |
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 1225 of file UT_Options.h.
|
friend |
Friend specialization of std::swap() to use UT_OptionsHolder::swap()
Definition at line 1233 of file UT_Options.h.
|
friend |
Friend specialization of std::swap() to use UT_OptionsHolder::swap()
Definition at line 1234 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 1242 of file UT_Options.h.
|
static |
Definition at line 1244 of file UT_Options.h.