wx.ComponentModel.DataModelBase Class Reference

Inheritance diagram for wx.ComponentModel.DataModelBase:

wx.ComponentModel.IDataModel wx.ComponentModel.PropertyModel wx.ComponentModel.ValueModel

List of all members.

Public Member Functions

void BeginInit ()
void BeginSetValue (object newValue)
void EndInit ()
void EndSetValue (bool commitOrRollback)
void PropagateValue ()

Public Attributes

event ValueChangedHandler OnValueChange

Protected Member Functions

 DataModelBase ()
 DataModelBase (Type referenceType)
abstract object GetValue ()
abstract bool IsConsistentValue (object value)
void PropagateChange (object newValue, object oldValue)
abstract void SetValue (object value)

Properties

IErrorHandler ErrorHandler [get, set]
abstract bool PropagatesChanges [get]
Type ReferenceType [get]
virtual object Value [get, set]


Detailed Description

Base class that helps to implement data models. This basically implements propagation of changes over depending models.

Constructor & Destructor Documentation

wx.ComponentModel.DataModelBase.DataModelBase ( Type  referenceType  )  [protected]

Create an instance of the provided reference type.

wx.ComponentModel.DataModelBase.DataModelBase (  )  [protected]

Create an instance of reference type System.Object.


Member Function Documentation

void wx.ComponentModel.DataModelBase.BeginInit (  ) 

All events will be deferred until EndInit() is called.

Implements wx.ComponentModel.IDataModel.

void wx.ComponentModel.DataModelBase.BeginSetValue ( object  newValue  ) 

Initializes value changing transaction. This will change the value and

Implements wx.ComponentModel.IDataModel.

void wx.ComponentModel.DataModelBase.EndInit (  ) 

Fires events that have been deferred by BeginnInit(). However, redundant events will not fire. Example: If this changes its value twice after BeginInit(), only the final assignment will be communicated by events.

This is usually the same as PropagateValue() but additionally ends BeginnInit().

Implements wx.ComponentModel.IDataModel.

void wx.ComponentModel.DataModelBase.EndSetValue ( bool  commitOrRollback  ) 

Ends the transaction for setting a new value. This throws a System.ApplitionException(), if BeginSetValue() has not been called before.

If commitOrRollback is true, then assign the new value. Otherwise, reset to the original value.

Implements wx.ComponentModel.IDataModel.

abstract object wx.ComponentModel.DataModelBase.GetValue (  )  [protected, pure virtual]

Override this to read the represented value.

Implemented in wx.ComponentModel.ValueModel, and wx.ComponentModel.PropertyModel.

abstract bool wx.ComponentModel.DataModelBase.IsConsistentValue ( object  value  )  [protected, pure virtual]

True iff value may be assigned by SetValue() without error. This is also allowed to throw an ErrorMessageException in order to provide full information for an error handler.

Implemented in wx.ComponentModel.ValueModel, and wx.ComponentModel.PropertyModel.

void wx.ComponentModel.DataModelBase.PropagateChange ( object  newValue,
object  oldValue 
) [protected]

This will raise OnValueChange.

void wx.ComponentModel.DataModelBase.PropagateValue (  ) 

Propagate the current value raising OnValueChange as if the current value replaces the current value.

Implements wx.ComponentModel.IDataModel.

abstract void wx.ComponentModel.DataModelBase.SetValue ( object  value  )  [protected, pure virtual]

Override this to change the represented value without propagation of dependencies. This MUST work without exceptions of IsConsistentValue() returns true.

Implemented in wx.ComponentModel.ValueModel, and wx.ComponentModel.PropertyModel.


Member Data Documentation

event ValueChangedHandler wx.ComponentModel.DataModelBase.OnValueChange

This event will be called on changing the value.

Implements wx.ComponentModel.IDataModel.


Property Documentation

IErrorHandler wx.ComponentModel.DataModelBase.ErrorHandler [get, set]

Get or set the error handler.

Implements wx.ComponentModel.IDataModel.

abstract bool wx.ComponentModel.DataModelBase.PropagatesChanges [get]

Overload this to declare whether this model is really able to detect and propagate all changes of the value.

Implements wx.ComponentModel.IDataModel.

Reimplemented in wx.ComponentModel.ValueModel, and wx.ComponentModel.PropertyModel.

Type wx.ComponentModel.DataModelBase.ReferenceType [get]

The configured reference type of the value.

Implements wx.ComponentModel.IDataModel.

virtual object wx.ComponentModel.DataModelBase.Value [get, set]

Get or set the encapsulated value.

Implements wx.ComponentModel.IDataModel.

Reimplemented in wx.ComponentModel.ValueModel.


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads