eVision .NET API
Loading...
Searching...
No Matches
eVision.EColorVector Class Reference

Vector objects are used to store 1-dimensional data. More...

Inheritance diagram for eVision.EColorVector:
Collaboration diagram for eVision.EColorVector:

Public Member Functions

 EColorVector ()
 Constructs a vector.
 EColorVector (uint un32MaxElements)
 EColorVector (eVision.EColorVector other)
 Constructs a vector.
void AddElement (eVision.EColor element)
 Appends (adds at the tail) an element to the vector.
eVision.EColor GetElement (int index)
 Returns the vector element at the given index.
void SetElement (int index, eVision.EColor value)
 Modifies the vector element at the given index by the given value.
Public Member Functions inherited from eVision.EVector
void Empty ()
 Resets the number of elements to 0.
virtual void RemoveElement (uint index)
 Removes the element at the specified position.
void Save (string path)
 Saves the EVector object with all its attributes.
void Save (eVision.ESerializer serializer)
 Saves the EVector object with all its attributes.
void Save (string path, uint un32Version)
 Saves the EVector object with all its attributes.
void Save (eVision.ESerializer serializer, uint un32Version)
 Saves the EVector object with all its attributes.
void Load (string path)
 Loads the EVector object with all its attributes.
void Load (eVision.ESerializer serializer)
 Loads the EVector object with all its attributes.
void Load (string path, uint un32Version)
 Loads the EVector object with all its attributes.
void Load (eVision.ESerializer serializer, uint un32Version)
 Loads the EVector object with all its attributes.

Properties

eVision.EColor this[uint index] [get, set]
 Gives access to the vector element at the given index.
IntPtr RawDataPtr [get]
 Pointer to the vector data.
Properties inherited from eVision.EVector
uint NumElements [get, set]
 Number of elements in the vector.

Detailed Description

Vector objects are used to store 1-dimensional data.

Using vectors is very similar to using 1-dimensional arrays, except that the size can vary at runtime. Memory allocation is handled internally.

  • To create a vector, use its constructor.
  • To fill a vector with values, first empty it, using the EVector.Empty member, and then add elements one at time at the tail by calling the EColorVector.AddElement member.
  • To access a vector element, either for reading or writing, use the [] operator.
  • To inquire for the current number of elements, use member EVector.NumElements.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EColorVector() [1/3]

eVision.EColorVector.EColorVector ( )

Constructs a vector.

◆ EColorVector() [2/3]

eVision.EColorVector.EColorVector ( uint un32MaxElements)
Parameters
un32MaxElementsMax number of elements in the EColorVector.

◆ EColorVector() [3/3]

eVision.EColorVector.EColorVector ( eVision.EColorVector other)

Constructs a vector.

Parameters
otherEColorVector object to be copied

Member Function Documentation

◆ AddElement()

void eVision.EColorVector.AddElement ( eVision.EColor element)

Appends (adds at the tail) an element to the vector.

Parameters
elementThe element to be added.

◆ GetElement()

eVision.EColor eVision.EColorVector.GetElement ( int index)

Returns the vector element at the given index.

Parameters
indexIndex, between 0 and EVector.NumElements (excluded) of the element to be accessed.

If the given index is outside the bounds of the vector, the error code EError.EError_Parameter1OutOfRange is set.

◆ SetElement()

void eVision.EColorVector.SetElement ( int index,
eVision.EColor value )

Modifies the vector element at the given index by the given value.

Parameters
indexIndex, between 0 and EVector.NumElements (excluded), of the element to be modified.
valueThe new value for the element.

If the given index is outside the bounds of the vector, the error code EError.EError_Parameter1OutOfRange is set.

Property Documentation

◆ RawDataPtr

IntPtr eVision.EColorVector.RawDataPtr
get

Pointer to the vector data.

◆ this[uint index]

eVision.EColor eVision.EColorVector.this[uint index]
getset

Gives access to the vector element at the given index.

Parameters
indexIndex, between 0 and EVector.NumElements (excluded) of the element to be accessed.