HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STY_BindingDataSource.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: STY_BindingDataSource.h (sty Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __STY_BindingDataSource__
12 #define __STY_BindingDataSource__
13 
14 #include "STY_API.h"
15 #include "STY_Types.h"
16 #include <UT/UT_Array.h>
17 #include <UT/UT_NonCopyable.h>
18 #include <UT/UT_IntrusivePtr.h>
19 
21 class UT_StringArray;
22 
23 /// Represents a data source for the override script input argument binding.
25  public UT_NonCopyable,
26  public UT_IntrusiveRefCounter<STY_BindingDataSource>
27 {
28 public:
29  virtual ~STY_BindingDataSource();
30 
31  /// Returns true if the subject can provide data given its name.
32  /// If so, it also returns the type of the data and the tuple size.
33  virtual bool getOverrideBindingInfo(
34  STY_BindingDataInfo &data_info ) const;
35 
36  /// Gets the int array data and returns true on success.
37  virtual bool getOverrideBindingData( UT_IntArray &data ) const;
38 
39  /// Gets the float array data and returns true on success.
40  virtual bool getOverrideBindingData( UT_FprealArray &data ) const;
41 
42  /// Gets the string array data and returns true on success.
43  virtual bool getOverrideBindingData( UT_StringArray &data ) const;
44 
45  /// Creates a STY_Binding set to a contsant value equivalent to the data
46  /// returned by this source.
47  STY_BindingHandle createConstantBinding(
48  const UT_StringHolder &arg_name) const;
49 };
50 
51 #endif
52 
Provides information about binding data.
#define STY_API
Definition: STY_API.h:10
A reference counter base class for use with UT_IntrusivePtr.
Represents a data source for the override script input argument binding.
Wrapper around hboost::intrusive_ptr.
Definition: format.h:895