Make your own free website on Tripod.com

IDMContainer

This invisible object used to store contents of data files in memory. It keeps dynamic array of elements (items), and every item may have different number of dynamically allocated 10-byte floating point values. Container provides full access to items collection and allows you to perform standard file I/O operations.

Read/only property r/o property ItemCount: long

Returns number of items in Items[] collection. In general, there's no limitations how long is data array, really it depends on your computer's performance. My files usually have about 1000 points, but DM2000 easily processes files with ~100000 points and even more!

Property property Items[Index: long]: OleVariant

Provides access to indexed items collection (Index=0..ItemCount-1). According to OLE standards, data item must be represented as variant. When you read Items[], you obtain variant array (aka VBArray), and each element of this array is double precision floating-point value. But when you write this property, you have an alternative: variant array or string of values separated by comma, tabstop or space. This is possible due to polymorphism of variants, and data will be automatically converted. See demos for more information.

Read/only property r/o property Strings[Index: Integer]: bstr

In some cases it may be preferred to get string representation of data element. Values will be rounded that may cause precision losses.

Method procedure AddItem(Values: OleVariant)

Adds item to the end of Items[] collection. As mentioned above, Values may be variant array or string.

Method procedure InsertItem(Position: long; Values: OleVariant)

Works like previous method, but insert item at specified position (0..ItemCount-1).

Method procedure DeleteItem(Position: long)

Deletes selected item.

Method procedure Clear

This procedure clears contents of data container. IDMContainer.Modified property automatically set to true.

Method procedure Load(const FileName: bstr)

Load data from disk file. Text-type file must contain values separated by commas, tabstops or spaces. Decimal point character always assumed to be point (.) independent on system locales, otherwise fractional part will be interpreted as separate value.

Method procedure Save(const FileName: bstr)

Save data to disk file. Values are separated by spaces, each item occupy separate line. IDMContainer.Modified property automatically cleared.

Read/only property r/o property FileName: bstr

Returns full name of loaded file. Note that Load() and Save() methods implicitly modify this property.

Property property Modified: boolean

This property used to track data modifications. When data implicitly modified by some method or you directly set this property, container fires internal event which will correctly update all worksheets and plots referenced this container. It takes a lot of calculations and painting job so don't change this property too frequently.