Rhino C++ API
8.14
|
#include <RhRdkContentField.h>
Public Member Functions | |
CRhRdkContentFields (const CRhRdkContent &c) | |
virtual | ~CRhRdkContentFields () |
virtual bool | AddValuesToParamBlock (IRhRdkParamBlock ¶mBlock, int sectionId, const wchar_t *wszExtraRequirementSet=nullptr) const |
void | BeginCreateDynamicFields (bool bAutomatic) |
virtual CRhRdkContent & | Content (void) const |
virtual int | Count (void) const |
bool | CreateDynamicField (const wchar_t *wszInternalName, const wchar_t *wszLocalName, const wchar_t *wszEnglishName, const CRhRdkVariant &vValue, const CRhRdkVariant &vMinValue=CRhRdkVariant(), const CRhRdkVariant &vMaxValue=CRhRdkVariant(), CRhRdkContentField::Filter setFilter=CRhRdkContentField::Filter::All, CRhRdkContentField::Filter getFilter=CRhRdkContentField::Filter::All, int sectionId=0, INT_PTR reserved=0) |
void | EndCreateDynamicFields (void) |
virtual void * | EVF (const wchar_t *, void *) |
virtual CRhRdkContentField * | Field (int iIndex) const |
virtual CRhRdkContentField * | FindField (const wchar_t *wszInternalName) const |
ON__UINT32 | GetFieldValueCRC (const CRhRdkContent::CRenderCRCFlags &rcrcFlags, CRhRdkContentField::Filter filter) const |
virtual bool | GetValuesFromParamBlock (const IRhRdkParamBlock ¶mBlock, int sectionId) |
virtual RDK_DEPRECATED bool | GetValuesFromParamBlock (const IRhRdkParamBlock ¶mBlock, int sectionId, CRhRdkContent::eChangeContext cc) |
virtual bool | GetValuesFromSection (const IRhRdk_XMLSection §ion, CRhRdkContentField::Filter filter) |
virtual RDK_DEPRECATED bool | GetValuesFromSection (const IRhRdk_XMLSection §ion, CRhRdkContentField::Filter filter, CRhRdkContent::eChangeContext cc) |
CRhRdkContentFields & | operator= (const CRhRdkContentFields &f) |
virtual bool | SetValuesToSection (IRhRdk_XMLSection §ion, CRhRdkContentField::Filter filter) const |
Protected Member Functions | |
virtual void | Add (CRhRdkContentField *pField) |
void | Initialize (void) |
virtual void | Remove (CRhRdkContentField *pField) |
virtual void | Uninitialize (void) |
Friends | |
class | CRhRdkContent |
class | CRhRdkContentField |
A collection of fields. This object is created by the content when its Fields() method is called.
CRhRdkContentFields::CRhRdkContentFields | ( | const CRhRdkContent & | c | ) |
|
virtual |
|
protectedvirtual |
Add a field. Called automatically by the field constructor.
|
virtual |
Add values to a param block from fields with the same internal name.
void CRhRdkContentFields::BeginCreateDynamicFields | ( | bool | bAutomatic | ) |
Automatic Dynamic Field support.
Dynamic fields are typically created in the override of CRhRdkContent::Initialize() and they are therefore created automatically whenever the content is created. However, some advanced users require the fields to be created in response to some user action which occurs much later than Initialize(). This creates the problem that the fields do not exist by default and therefore cannot be loaded when the document is loaded. These methods are provided to solve that problem by making it possible to automatically create the dynamic fields on loading if they don't already exist. Dynamic fields that have this auto-create-on-load behavior are referred to as automatic dynamic fields.
bAutomatic | specifies if the dynamic fields are automatic. If so, they will be created automatically during loading of the document. |
|
virtual |
|
virtual |
bool CRhRdkContentFields::CreateDynamicField | ( | const wchar_t * | wszInternalName, |
const wchar_t * | wszLocalName, | ||
const wchar_t * | wszEnglishName, | ||
const CRhRdkVariant & | vValue, | ||
const CRhRdkVariant & | vMinValue = CRhRdkVariant() , |
||
const CRhRdkVariant & | vMaxValue = CRhRdkVariant() , |
||
CRhRdkContentField::Filter | setFilter = CRhRdkContentField::Filter::All , |
||
CRhRdkContentField::Filter | getFilter = CRhRdkContentField::Filter::All , |
||
int | sectionId = 0 , |
||
INT_PTR | reserved = 0 |
||
) |
Create a dynamic field with an initial value and min and max limits.
wszInternalName | is the internal name of the field. Not localized. |
wszLocalName | is the localized user-friendly name of the field. |
wszEnglishName | is the English user-friendly name of the field. |
vValue | is the initial value of the field. |
vMinValue | is the minimum value of the field. Must be the same type as vValue. |
vMaxValue | is the maximum value of the field. Must be the same type as vValue. |
setFilter | is 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. |
getFilter | is 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. |
sectionId | is used for filtering fields between sections. Zero if not needed. |
reserved | is reserved for future use. Must be zero. |
void CRhRdkContentFields::EndCreateDynamicFields | ( | void | ) |
You must call this after creating dynamic fields. Calls to this method are counted; you must call BeginCreateDynamicFields() once for every call to EndCreateDynamicFields().
|
virtual |
Emergency virtual function for future expansion.
|
virtual |
Get a field in the collection.
iIndex | is the index of the field. This must be 0 <= iIndex < Count(). |
|
virtual |
wszInternalName | is the name of the field to find. |
ON__UINT32 CRhRdkContentFields::GetFieldValueCRC | ( | const CRhRdkContent::CRenderCRCFlags & | rcrcFlags, |
CRhRdkContentField::Filter | filter | ||
) | const |
Calculate the CRC of all fields that match a filter.
filter | is a filter to control which fields are considered. |
|
virtual |
Get values from a param block into fields with the same internal name.
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Get values from a section into fields with the same internal name.
section | is the section to read values from. |
filter | is a filter to control which fields are modified. |
|
virtual |
This method is deprecated in favor of the one below.
|
protected |
CRhRdkContentFields& CRhRdkContentFields::operator= | ( | const CRhRdkContentFields & | f | ) |
|
protectedvirtual |
Remove a field. Called automatically by the field destructor.
|
virtual |
Set values into a section from fields with the same internal name.
section | is the section to write values to. |
filter | is a filter to control which fields are transferred to the section. |
|
protectedvirtual |
|
friend |
|
friend |