HDK
|
#include <UT_Options.h>
Public Types | |
enum | UT_OptionsReferenceType { REFERENCE } |
Public Types inherited from UT_OptionsRef | |
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 Public Member Functions inherited from UT_OptionsRef | |
static const UT_Options & | emptyOptions () |
Definition at line 1016 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 1021 of file UT_Options.h.
|
inline |
Definition at line 1024 of file UT_Options.h.
|
inline |
Will make a copy of the provided options.
Definition at line 1031 of file UT_Options.h.
|
inline |
Definition at line 1041 of file UT_Options.h.
|
inline |
Will make a shallow reference.
Definition at line 1049 of file UT_Options.h.
|
inline |
Makes a shallow reference to the contents of the UT_OptionsRef.
Definition at line 1056 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 1069 of file UT_Options.h.
|
inline |
Makes a copy of the provided options.
Definition at line 1076 of file UT_Options.h.
|
inlinenoexcept |
Move constructor. Steals the working data from the original.
Definition at line 1083 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 1129 of file UT_Options.h.
|
inline |
Makes a bit-wise copy of the options and adjust the reference count.
Definition at line 1090 of file UT_Options.h.
|
inline |
Move the contents of about-to-be-destructed options s to this options.
Definition at line 1099 of file UT_Options.h.
|
inline |
Definition at line 1106 of file UT_Options.h.
|
inline |
Definition at line 1112 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 1151 of file UT_Options.h.
|
friend |
Friend specialization of std::swap() to use UT_OptionsHolder::swap()
Definition at line 1159 of file UT_Options.h.
|
friend |
Friend specialization of std::swap() to use UT_OptionsHolder::swap()
Definition at line 1160 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 1168 of file UT_Options.h.
|
static |
Definition at line 1170 of file UT_Options.h.