HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STY_Binding Class Reference

Defines a data binding for the script argument. More...

#include <STY_Binding.h>

+ Inheritance diagram for STY_Binding:

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_StringHoldergetArgName () const
 Getters for binding definition items. More...
 
const UT_StringHoldergetDataName () const
 Getters for binding definition items. More...
 
const STY_BindingDataSourceHandlegetConstantDataSource () 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_IntrusiveRefCounteroperator= (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_NonCopyableoperator= (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...
 

Detailed Description

Defines a data binding for the script argument.

Definition at line 26 of file STY_Binding.h.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

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 ( )

Member Function Documentation

const UT_StringHolder& STY_Binding::getArgName ( ) const
inline

Getters for binding definition items.

Definition at line 60 of file STY_Binding.h.

const STY_BindingDataSourceHandle& STY_Binding::getConstantDataSource ( ) const
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.

const UT_StringHolder& STY_Binding::getDataName ( ) const
inline

Getters for binding definition items.

Definition at line 62 of file STY_Binding.h.

DataSourceType STY_Binding::getDataSourceType ( ) const
inline

Getters for binding definition items.

Definition at line 58 of file STY_Binding.h.

static bool STY_Binding::loadBindings ( UT_Array< STY_BindingHandle > &  bindings,
const UT_JSONValue json 
)
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.


The documentation for this class was generated from the following file: