Rhino C++ API  8.13
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
IRhRdkParamBlock Class Referenceabstract

#include <RhRdkAutomaticUI.h>

Classes

class  IIterator
 
class  IParam
 

Public Types

enum  eSortBy { paramName, friendlyName }
 
enum  SortBy : unsigned int { SortBy::ParamName, SortBy::DisplayName }
 
enum  UiHints : unsigned int {
  UiHints::None, UiHints::Folder, UiHints::Filename, UiHints::Combo,
  UiHints::Solar, UiHints::Location
}
 

Public Member Functions

virtual ~IRhRdkParamBlock ()
 
virtual bool Add (const wchar_t *wszParamName, const wchar_t *wszChildSlotName, const wchar_t *wszDisplayName, const CRhRdkVariant &vValue, const CRhRdkVariant &vMin, const CRhRdkVariant &vMax, UiHints uih=UiHints::None, const wchar_t *wszExtraRequirementSet=nullptr, const IAutoUIExtraRequirements *pExtraRequirements=nullptr)=0
 
virtual void Clear (void)=0
 
virtual void DeleteThis (void)=0
 
virtual void * EVF (const wchar_t *, void *)=0
 
virtual bool Get (const wchar_t *wszParamName, CRhRdkVariant &vValueOut) const =0
 
virtual const IParamGetParam (const wchar_t *wszParamName) const =0
 
virtual IParamGetParam (const wchar_t *wszParamName)=0
 
virtual IIteratorNewIterator (void) const =0
 
virtual bool Remove (const wchar_t *wszParamName)=0
 
virtual void Sort (SortBy by)=0
 

Static Public Member Functions

static IRhRdkParamBlockNew (IRhinoUiDataSource &ds)
 
static IRhRdkParamBlockNew (void)
 

Detailed Description

The RDK provides automatic user interface services that allow the user to manipulate arbitrary sets of named parameters which can be stored inside your RDK plug-in. The RDK accesses the parameters by means of the IRhRdkParamBlock interface. This interface is only implemented inside the RDK.

See also
IRhRdkParamTransportEx

When using the 'raw' automatic UI, it's recommended that you use CRhRdkParamTransport as a base class for your implementation of IRhRdkParamTransportEx so you will not have to worry about managing the param block object. The parameter transport will be implemented to transfer data items to and from the param block.

Member Enumeration Documentation

◆ eSortBy

Enumerator
paramName 
friendlyName 

◆ SortBy

enum IRhRdkParamBlock::SortBy : unsigned int
strong
Enumerator
ParamName 
DisplayName 

◆ UiHints

enum IRhRdkParamBlock::UiHints : unsigned int
strong
Enumerator
None 
Folder 
Filename 
Combo 
Solar 
Location 

Constructor & Destructor Documentation

◆ ~IRhRdkParamBlock()

virtual IRhRdkParamBlock::~IRhRdkParamBlock ( )
inlinevirtual

Member Function Documentation

◆ Add()

virtual bool IRhRdkParamBlock::Add ( const wchar_t *  wszParamName,
const wchar_t *  wszChildSlotName,
const wchar_t *  wszDisplayName,
const CRhRdkVariant vValue,
const CRhRdkVariant vMin,
const CRhRdkVariant vMax,
UiHints  uih = UiHints::None,
const wchar_t *  wszExtraRequirementSet = nullptr,
const IAutoUIExtraRequirements pExtraRequirements = nullptr 
)
pure virtual

Add a parameter to the collection.

Parameters
wszParamNameis the name of the parameter to add. If a parameter with this name already exists, the function will fail.
wszChildSlotNameis the child slot name associated with the parameter.
wszDisplayNameis the localized display name of the parameter.
vValueis the parameter's value.
vMinis the parameter's minimum value (optional, can be nil).
vMaxis the parameter's maximum value (optional, can be nil).
uihallows the UI to be enhanced by interpreting the value in a special way.
wszExtraRequirementSetis the optional name of an extra requirement set.
pExtraRequirementsis a pointer to an extra requirement interface. If wszExtraRequirementSet is specified, this pointer cannot be null.
See also
IAutoUIExtraRequirements
Returns
true if successful, else false.

◆ Clear()

virtual void IRhRdkParamBlock::Clear ( void  )
pure virtual

Clear the collection.

◆ DeleteThis()

virtual void IRhRdkParamBlock::DeleteThis ( void  )
pure virtual

This method is implemented as

delete this;

◆ EVF()

virtual void* IRhRdkParamBlock::EVF ( const wchar_t *  ,
void *   
)
pure virtual

Emergency virtual function for future expansion.

◆ Get()

virtual bool IRhRdkParamBlock::Get ( const wchar_t *  wszParamName,
CRhRdkVariant vValueOut 
) const
pure virtual

Get a parameter from the collection by its internal name.

Returns
true on success, false if parameter not found.

◆ GetParam() [1/2]

virtual const IParam* IRhRdkParamBlock::GetParam ( const wchar_t *  wszParamName) const
pure virtual

◆ GetParam() [2/2]

virtual IParam* IRhRdkParamBlock::GetParam ( const wchar_t *  wszParamName)
pure virtual

◆ New() [1/2]

static IRhRdkParamBlock* IRhRdkParamBlock::New ( IRhinoUiDataSource ds)
static

Only kept for backward compatibility. SDK clients should ignore this method and use the one above.

◆ New() [2/2]

static IRhRdkParamBlock* IRhRdkParamBlock::New ( void  )
static
Returns
a new instance of a generic param block.

◆ NewIterator()

virtual IIterator* IRhRdkParamBlock::NewIterator ( void  ) const
pure virtual

Get an iterator to use when calling Next(). The caller shall delete the iterator.

◆ Remove()

virtual bool IRhRdkParamBlock::Remove ( const wchar_t *  wszParamName)
pure virtual

Remove a parameter from the collection.

Returns
true if successful, else false.

◆ Sort()

virtual void IRhRdkParamBlock::Sort ( SortBy  by)
pure virtual

Sort the collection.