the fair gds editor MacroClassDoubleList
Please Sign in

DoubleList Class Reference

The doubleList class provides a list of double precision floating point numbers. More...

This feature is only part of LayoutEditors C++ Macros.

See also: List of Classes


Detailed Description

The doubleList class provides a list of double precision floating point numbers. It can be used in combination with c++ arrays of the type double. That means any double array created in a macro is also a doubleList and visa versa.

   1 double doubleArray[10];
   2 
   3 doubleArray[5]=10.5;
   4 doubleAttay.at(6)=6.5;
   5 if (doubleArray.contains(6.5) {
   6     //...
   7 }

In LayoutScript the list differs from the build in lists.

Member Function Documentation

doubleList::doubleList( )

creates a doubleList

(introduced with version 20170520)

doubleList::doubleList( doubleList list )

creates a doubleList with copied data from list

(introduced with version 20170520)

void doubleList::append(double d)

Insert d at the end of the list.

double doubleList::at(int i)

Returns: double at the position i

bool doubleList::contains(double d)

Returns: true if the doubleList contains the number d. Otherwise false.

int doubleList::indexOf(double d, int index=0)

Returns: the index position of the first occurrence of the double d in this list, searching forward from index position from. Returns -1 if d is not found. (introduced with version 20130411)

void doubleList::insert(int pos, double value)

value is added at position pos (introduced with version 20161005)

int doubleList::removeAll(double d)

Removes all occurrences of d in the list and returns the number of entries removed.

void doubleList::removeAt(int pos)

position pos is removed from the list (introduced with version 20161005)

int doubleList::size()

Returns: number of doubles in the doubleList

void doubleList::set(int i, double d)

Sets the ith entry of the list to d. The first entry of the list starts with 0. It will have no effect, if the list did not have a size of i.

void doubleList::swap(int pos1, int pos2)

Swaps the value at pos1 and pos2 (introduced with version 20161005)

See also


CategoryMacroClass CategoryMacroClassBasic


MacroClassDoubleList (last edited 2017-05-22 07:50:17 by JurgenThies)