Rhino C++ API  8.13
Public Member Functions | List of all members
CRhRdkDynamicContentField Class Reference

#include <RhRdkContentField.h>

Inheritance diagram for CRhRdkDynamicContentField:
CRhRdkContentField

Public Member Functions

 CRhRdkDynamicContentField (CRhRdkContent &c, const wchar_t *wszInternalName, const wchar_t *wszLocalName, const wchar_t *wszEnglishName, const CRhRdkVariant &vValue, const CRhRdkVariant &vMinValue, const CRhRdkVariant &vMaxValue, Filter setFilter=All, Filter getFilter=All, int sectionId=0, INT_PTR reserved=0)
 
 CRhRdkDynamicContentField (CRhRdkContent &c, const wchar_t *wszInternalName, const wchar_t *wszLocalName, const wchar_t *wszEnglishName, const CRhRdkVariant &vValue, Filter setFilter=All, Filter getFilter=All, int sectionId=0, INT_PTR reserved=0)
 
virtual void * EVF (const wchar_t *, void *) override
 
virtual CRhRdkContentFieldMakeCopy (CRhRdkContent &) const override
 
- Public Member Functions inherited from CRhRdkContentField
 CRhRdkContentField (CRhRdkContent &c, const wchar_t *wszInternalName, const wchar_t *wszFriendlyName, eFilter setFilter=All, eFilter getFilter=All, INT_PTR reserved=0)
 
 CRhRdkContentField (CRhRdkContent &c, const wchar_t *wszInternalName, const wchar_t *wszLocalName, const wchar_t *wszEnglishName, Filter setFilter=All, Filter getFilter=All, int sectionId=0, bool bDynamic=false, INT_PTR reserved=0)
 
virtual ~CRhRdkContentField ()
 
const void * AsBuffer (size_t &sizeOut) const
 
void * AsPointer (void) const
 
virtual CRhRdkContentContent (void) const
 
virtual UINT Conversion (void) const
 
virtual CRhRdkVariant ConvertFromDisplay (const CRhRdkVariant &v) const
 
virtual CRhRdkVariant ConvertToDisplay (const CRhRdkVariant &v) const
 
virtual ON_wString EnglishName (void) const
 
virtual RDK_DEPRECATED ON_wString FriendlyName (void) const
 
virtual Filter GetFilter (void) const
 
virtual bool GetLimits (CRhRdkVariant &vMin, CRhRdkVariant &vMax) const
 
virtual void GetValueFromSection (const IRhRdk_XMLSection &section)
 
void Initialize (const CRhRdkVariant &v)
 
virtual ON_wString InternalName (void) const
 
bool IsDynamic (void) const
 
bool IsHiddenInAutoUI (void) const
 
virtual ON_wString LocalName (void) const
 
 operator bool (void) const
 
 operator const wchar_t * (void) const
 
 operator CRhRdkColor (void) const
 
 operator CRhRdkVariant (void) const
 
 operator double (void) const
 
 operator float (void) const
 
 operator int (void) const
 
 operator ON_2dVector (void) const
 
 operator ON_3dVector (void) const
 
 operator ON_4dPoint (void) const
 
 operator ON_Color (void) const
 
 operator ON_Xform (void) const
 
 operator time_t (void) const
 
 operator UUID (void) const
 
bool operator!= (const CRhRdkContentField &v) const
 
bool operator< (const CRhRdkContentField &v) const
 
const CRhRdkContentFieldoperator= (bool b)
 
const CRhRdkContentFieldoperator= (const char *sz)
 
const CRhRdkContentFieldoperator= (const CRhRdkContentField &f)
 
const CRhRdkContentFieldoperator= (const CRhRdkVariant &v)
 
const CRhRdkContentFieldoperator= (const ON_2dVector &v)
 
const CRhRdkContentFieldoperator= (const ON_3dVector &v)
 
const CRhRdkContentFieldoperator= (const ON_4dPoint &p)
 
const CRhRdkContentFieldoperator= (const ON_Color &c)
 
const CRhRdkContentFieldoperator= (const ON_Xform &xform)
 
const CRhRdkContentFieldoperator= (const time_t &time)
 
const CRhRdkContentFieldoperator= (const UUID &uuid)
 
const CRhRdkContentFieldoperator= (const wchar_t *wsz)
 
const CRhRdkContentFieldoperator= (double d)
 
const CRhRdkContentFieldoperator= (float f)
 
const CRhRdkContentFieldoperator= (int i)
 
const CRhRdkContentFieldoperator= (void *p)
 
bool operator== (const CRhRdkContentField &v) const
 
bool operator> (const CRhRdkContentField &v) const
 
virtual int SectionId (void) const
 
virtual void SetConversion (UINT uFlags)
 
virtual Filter SetFilter (void) const
 
void SetIsHiddenInAutoUI (bool bHidden)
 
virtual bool SetLimits (const CRhRdkVariant &vMin, const CRhRdkVariant &vMax)
 
virtual bool SetValue (const CRhRdkVariant &vNewValue)
 
virtual RDK_DEPRECATED bool SetValue (const CRhRdkVariant &vNewValue, CRhRdkContent::eChangeContext cc)
 
virtual void SetValueToSection (IRhRdk_XMLSection &section) const
 
virtual ON_wString UndoString (void) const
 
virtual const CRhRdkVariantValue (void) const
 

Additional Inherited Members

- Public Types inherited from CRhRdkContentField
enum  : unsigned int { conv_none = 0x0000, conv_percentile = 0x0001, conv_one_minus = 0x0002, conv_radians = 0x0004 }
 
typedef Filter eFilter
 
enum  Filter : unsigned int {
  None = 0x00, Serialization = 0x01, Harvesting = 0x02, Rendering = 0x04,
  All = 0xFF
}
 
- Protected Member Functions inherited from CRhRdkContentField
CImpl & Impl (void) const
 
CRhRdkContentFieldNewField (CRhRdkContent &c) const
 

Detailed Description

This class makes it easier for clients to create dynamic fields in their Initialize() override or in a custom Content I/O plug-in. It is similar to a static field but can be added to the content at run-time. It is not strictly necessary to use this class to get a dynamic field, but it just makes it easier.

Constructor & Destructor Documentation

◆ CRhRdkDynamicContentField() [1/2]

CRhRdkDynamicContentField::CRhRdkDynamicContentField ( CRhRdkContent c,
const wchar_t *  wszInternalName,
const wchar_t *  wszLocalName,
const wchar_t *  wszEnglishName,
const CRhRdkVariant vValue,
Filter  setFilter = All,
Filter  getFilter = All,
int  sectionId = 0,
INT_PTR  reserved = 0 
)

Constructs a dynamic field with an initial value and no limits.

Parameters
cis the content that the field belongs to.
wszInternalNameis the internal name of the field. Not localized.
wszLocalNameis the localized user-friendly name of the field.
wszEnglishNameis the English user-friendly name of the field.
vValueis the initial value of the field.
setFilteris a filter for use during CRhRdkContentFields::SetValuesToSection(). The field is skipped if setFilter does not match at least one item in the call's filter.
getFilteris a filter for use during CRhRdkContentFields::GetValuesFromSection(). The field is skipped if getFilter does not match at least one item in the call's filter.
sectionIdis used for filtering fields between sections. Zero if not needed.
reservedis reserved for future use. Must be zero.

◆ CRhRdkDynamicContentField() [2/2]

CRhRdkDynamicContentField::CRhRdkDynamicContentField ( CRhRdkContent c,
const wchar_t *  wszInternalName,
const wchar_t *  wszLocalName,
const wchar_t *  wszEnglishName,
const CRhRdkVariant vValue,
const CRhRdkVariant vMinValue,
const CRhRdkVariant vMaxValue,
Filter  setFilter = All,
Filter  getFilter = All,
int  sectionId = 0,
INT_PTR  reserved = 0 
)

Constructs a dynamic field with an initial value and min and max limits.

Parameters
cis the content that the field belongs to.
wszInternalNameis the internal name of the field. Not localized.
wszLocalNameis the localized user-friendly name of the field.
wszEnglishNameis the English user-friendly name of the field.
vValueis the initial value of the field.
vMinValueis the minimum value of the field. Must be the same type as vValue.
vMaxValueis the maximum value of the field. Must be the same type as vValue.
setFilteris a filter for use during CRhRdkContentFields::SetValuesToSection(). The field is skipped if setFilter does not match at least one item in the call's filter.
getFilteris a filter for use during CRhRdkContentFields::GetValuesFromSection(). The field is skipped if getFilter does not match at least one item in the call's filter.
sectionIdis used for filtering fields between sections. Zero if not needed.
reservedis reserved for future use. Must be zero.

Member Function Documentation

◆ EVF()

virtual void* CRhRdkDynamicContentField::EVF ( const wchar_t *  ,
void *   
)
overridevirtual

Emergency virtual function for future expansion.

Reimplemented from CRhRdkContentField.

◆ MakeCopy()

virtual CRhRdkContentField* CRhRdkDynamicContentField::MakeCopy ( CRhRdkContent ) const
overridevirtual

Return an exact copy of this field, with the same value and type.

Reimplemented from CRhRdkContentField.