#include <node.h>
Inheritance diagram for mudbox::AttributePointer< type >:

This object has the following advantages over a plain pointer:
Public Member Functions |
|
| AttributePointer (Node *pOwner=NULL, const QString &sID="") | |
| AttributePointer (Node *pOwner, const QString &sID, bool bInstall) | |
| QString | AsString (void) const |
| void | SetFromString (const QString &) |
| void | SetValidator (validator *pValidator) |
| Register a function as the validator for
this pointer. This function will be called each time a new value
has to be assigned to the pointer. If this function returns false
the value wont be assigned to the pointer. |
|
| void | SetPointerValue (Node *pNode, bool bLink=true) |
| void | SetValue (type *cValue, bool bX=false) |
| void | AddTarget (Attribute &cTarget) |
| void | DeleteTarget (void) |
| Deletes the object what is referred in this
pointer. |
|
| void | Serialize (Stream &s) |
| Serializes the pointer value to a stream.
|
|
| void | StartEvent (NodeEventType cType) const |
| Attribute::AttributeType | Type (void) const |
| PTROPERATORS (type) | |
| template<> | |
| AttributeWidget * | CreateEditorWidget (QWidget *pParent, int iWidth) |
Public Attributes |
|
| QString | m_sNullString |
| bool | m_bAllowNull |
Friends |
|
| class | Node |
| class | AttributeThisPointer |
| struct | Attribute |
|
||||||||||||||||
00566 :
AttributePointer( Node *pOwner=NULL, const QString &sID = "") : AttributeInstance<type *>( pOwner, sID ) { SetValue( 0, true ); m_pValidator = 0; m_sNullString = "NULL"; m_bAllowNull = true; };
|
|
||||||||||||||||||||
00566 :
AttributePointer( Node *pOwner=NULL, const QString &sID = "") : AttributeInstance<type *>( pOwner, sID ) { SetValue( 0, true ); m_pValidator = 0; m_sNullString = "NULL"; m_bAllowNull = true; };
|
|
||||||||||
|
Reimplemented from mudbox::AttributeInstance< type * >.
00566 :
AttributePointer( Node *pOwner=NULL, const QString &sID = "") : AttributeInstance<type *>( pOwner, sID ) { SetValue( 0, true ); m_pValidator = 0; m_sNullString = "NULL"; m_bAllowNull = true; };
|
|
||||||||||
|
Reimplemented from mudbox::AttributeInstance< type * >.
00566 :
AttributePointer( Node *pOwner=NULL, const QString &sID = "") : AttributeInstance<type *>( pOwner, sID ) { SetValue( 0, true ); m_pValidator = 0; m_sNullString = "NULL"; m_bAllowNull = true; };
|
|
||||||||||
|
Register a function as the validator for this pointer. This function will be called each time a new value has to be assigned to the pointer. If this function returns false the value wont be assigned to the pointer.
00568 : AttributeInstance<type *>( pOwner, sID, bInstall ) { SetValue( 0, true ); m_pValidator = 0; m_sNullString = "NULL"; m_bAllowNull = true; };
|
|
||||||||||||||||
|
Reimplemented from mudbox::Attribute.
00569 { if ( PointerValue() ) return PointerValue()->Name(); else return m_sNullString; };
00570 void SetFromString( const QString & /*sValue*/ ) { SetPointerValue( 0 ); };
00572 inline void SetValidator( validator *pValidator ) { m_pValidator = pValidator; };
00573 void SetPointerValue( Node *pNode, bool bLink = true )
00574 {
00575 // always accept 0 pointer, the target may be destroyed
00576 if ( pNode && m_pValidator && !m_pValidator( dynamic_cast<type *>( pNode ) ) )
00577 return;
00578 if ( bLink )
|
|
||||||||||||||||
|
Reimplemented from mudbox::AttributeInstance< type * >.
00584 {
00585 if ( cValue == AttributePointer<type>::Value() )
00586 return;
|
|
||||||||||
|
Reimplemented from mudbox::AttributeInstance< type * >.
00592 {
00593 Attribute::AddTarget( cTarget );
00594 if ( cTarget.Size() )
00595 {
|
|
||||||||||
|
Deletes the object what is referred in this pointer.
00602 {
|
|
||||||||||
|
Serializes the pointer value to a stream. The following two lines are doing the same:
s == m_pMyPointer;
m_pMyPointer.Serialize( s );
Reimplemented from mudbox::AttributeInstance< type * >. |
|
||||||||||
|
Reimplemented from mudbox::Attribute.
00622 {
00623 AttributeInstance<type *>::StartEvent( cType );
|
|
||||||||||
|
Reimplemented from mudbox::AttributeInstance< type * >. |
|
||||||||||
|
||||||||||||||||
|
Reimplemented from mudbox::AttributeInstance< type * >.
02118 { return CreateNewImageWidget( pParent, iWidth, this ); };
|
|
|||||
|
Reimplemented from mudbox::Attribute. |
|
|||||
|
|||||
|
|||||
|
|||||