Rhino C++ API  8.14
Public Member Functions | List of all members
CRhRdkContent::Change< T > Class Template Reference

#include <RhRdkContent.h>

Public Member Functions

 Change (const CRhRdkContent &c, RhRdkChangeContext cc=RhRdkChangeContext::Ignore)
 
 ~Change ()
 
T & operator() (void) const
 

Detailed Description

template<class T>
class CRhRdkContent::Change< T >

Helper class for automatically creating BeginChange() / EndChange() bracketed calls. Example usage:

{ const CRhRdkContent::Change<CMyTexture> t(*pMyTexture, RhRdkChangeContext::UI); // BeginChange() called here.
t().SetMyValue(...); // Calls CRhRdkContent::Changed() if value changed.
} // EndChange() called here.
Note
Using the default 'Ignore' ensures that the content will not be copied and no events will be sent by EndChange().

Constructor & Destructor Documentation

◆ Change()

template<class T >
CRhRdkContent::Change< T >::Change ( const CRhRdkContent c,
RhRdkChangeContext  cc = RhRdkChangeContext::Ignore 
)
inline

◆ ~Change()

template<class T >
CRhRdkContent::Change< T >::~Change ( )
inline

Member Function Documentation

◆ operator()()

template<class T >
T& CRhRdkContent::Change< T >::operator() ( void  ) const
inline
UI
enum RHRDK_SDK enum RHRDK_SDK UI
Definition: RhRdkDefinitions.h:132
CRhRdkContent::Change
Definition: RhRdkContent.h:349