HDK
|
Defines a data binding for the script argument. More...
#include <STY_Binding.h>
Public Types | |
enum | DataSourceType { SOURCE_DEFAULT, SOURCE_PREBINDING, SOURCE_CONSTANT } |
Describes what kind of data the argument is bound to. More... | |
Public Member Functions | |
STY_Binding (const UT_StringHolder &arg_name, const UT_JSONValue *json) | |
STY_Binding (const UT_StringHolder &arg_name, const STY_ConstantHandle &const_value) | |
STY_Binding (DataSourceType data_source_type, const UT_StringHolder &arg_name, const UT_StringHolder &data_name, const STY_ConstantHandle &const_value) | |
~STY_Binding () | |
void | saveStyleSheet (UT_JSONValueMap *map) const |
Save this binding as JSON to a style sheet. More... | |
DataSourceType | getDataSourceType () const |
Getters for binding definition items. More... | |
const UT_StringHolder & | getArgName () const |
Getters for binding definition items. More... | |
const UT_StringHolder & | getDataName () const |
Getters for binding definition items. More... | |
const STY_BindingDataSourceHandle & | getConstantDataSource () const |
Getters for binding definition items. More... | |
STY_ConstantHandle | getConstantValue () const |
Getters for binding definition items. More... | |
Public Member Functions inherited from UT_IntrusiveRefCounter< STY_Binding > | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter () noexcept |
Default constructor: Sets counter to 0. More... | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept |
Copy constructor: Sets counter to 0. More... | |
UT_IntrusiveRefCounter & | operator= (const UT_IntrusiveRefCounter &) noexcept |
Assignment operator: Does not modify counter. More... | |
SYS_FORCE_INLINE uint32 | use_count () const noexcept |
Return current counter. More... | |
SYS_FORCE_INLINE bool | conditionalAddRef () noexcept |
Static Public Member Functions | |
static bool | loadBindings (UT_Array< STY_BindingHandle > &bindings, const UT_JSONValue *json) |
Additional Inherited Members | |
Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable | |
UT_NonCopyable ()=default | |
~UT_NonCopyable ()=default | |
UT_NonCopyable (const UT_NonCopyable &)=delete | |
UT_NonCopyable & | operator= (const UT_NonCopyable &)=delete |
Protected Member Functions inherited from UT_IntrusiveRefCounter< STY_Binding > | |
SYS_FORCE_INLINE | ~UT_IntrusiveRefCounter () |
Destructor: Only derived classes can destruct this. More... | |
Defines a data binding for the script argument.
Definition at line 26 of file STY_Binding.h.
Describes what kind of data the argument is bound to.
Enumerator | |
---|---|
SOURCE_DEFAULT | |
SOURCE_PREBINDING | |
SOURCE_CONSTANT |
Definition at line 32 of file STY_Binding.h.
STY_Binding::STY_Binding | ( | const UT_StringHolder & | arg_name, |
const UT_JSONValue * | json | ||
) |
Creates a binding definition for the given argument name and the json value that describes the data source.
STY_Binding::STY_Binding | ( | const UT_StringHolder & | arg_name, |
const STY_ConstantHandle & | const_value | ||
) |
STY_Binding::STY_Binding | ( | DataSourceType | data_source_type, |
const UT_StringHolder & | arg_name, | ||
const UT_StringHolder & | data_name, | ||
const STY_ConstantHandle & | const_value | ||
) |
STY_Binding::~STY_Binding | ( | ) |
|
inline |
Getters for binding definition items.
Definition at line 60 of file STY_Binding.h.
|
inline |
Getters for binding definition items.
Definition at line 65 of file STY_Binding.h.
STY_ConstantHandle STY_Binding::getConstantValue | ( | ) | const |
Getters for binding definition items.
|
inline |
Getters for binding definition items.
Definition at line 62 of file STY_Binding.h.
|
inline |
Getters for binding definition items.
Definition at line 58 of file STY_Binding.h.
|
static |
Loads binding array from a given json value. The caller owns the binding objects returned in the array.
void STY_Binding::saveStyleSheet | ( | UT_JSONValueMap * | map | ) | const |
Save this binding as JSON to a style sheet.