eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::EC24Vector Class Reference

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

#include <eVision/Easy/EC24Vector.h>

Inheritance diagram for eVision::EC24Vector:
Collaboration diagram for eVision::EC24Vector:

Public Member Functions

 EC24Vector ()
 Constructs a vector.
 EC24Vector (uint32_t maxNumberOfElements)
 Constructs a vector.
 EC24Vector (const eVision::EC24Vector &other)
 Constructs a vector.
virtual ~EC24Vector () throw ()
eVision::EC24 & operator[] (uint32_t index) const
 Gives access to the vector element at the given index.
eVision::EC24Vector & operator= (const eVision::EC24Vector &other)
 Copies all the data from another EC24Vector object into the current EC24Vector object.
void * GetRawDataPtr () const
 Pointer to the vector data.
void AddElement (eVision::EC24 element)
 Appends (adds at the tail) an element to the vector.
eVision::EC24 GetElement (int32_t index) const
 Returns the vector element at the given index.
void SetElement (int32_t index, eVision::EC24 value)
 Modifies the vector element at the given index by the given value.
void SetYRange (int32_t n32YMin, uint32_t un32YMax)
void SetYRange (int32_t n32YMin)
void SetYRange ()
void Draw (eVision::EDrawAdapter *graphicContext, float width, float height) const
 Draws a plot of the vector element values.
void Draw (eVision::EDrawAdapter *graphicContext, float width, float height, float originX, float originY) const
 Draws a plot of the vector element values.
void Draw (eVision::EDrawAdapter *graphicContext, float width, float height, float originX, float originY, const eVision::ERGBColor &color0, const eVision::ERGBColor &color1, const eVision::ERGBColor &color2) const
 Draws a plot of the vector element values.
void Draw (eVision::EDrawAdapter *graphicContext, float width, float height, const eVision::ERGBColor &color0, const eVision::ERGBColor &color1, const eVision::ERGBColor &color2) const
 Draws a plot of the vector element values.
void Draw (HDC graphicContext, float width, float height) const
 Draws a plot of the vector element values.
void Draw (HDC graphicContext, float width, float height, float originX, float originY) const
 Draws a plot of the vector element values.
void Draw (HDC graphicContext, float width, float height, float originX, float originY, const eVision::ERGBColor &color0, const eVision::ERGBColor &color1, const eVision::ERGBColor &color2) const
 Draws a plot of the vector element values.
void Draw (HDC graphicContext, float width, float height, const eVision::ERGBColor &color0, const eVision::ERGBColor &color1, const eVision::ERGBColor &color2) const
 Draws a plot of the vector element values.
 EC24Vector (CppWrapperInternal::InternalConstructor)
Public Member Functions inherited from eVision::EVector
virtual ~EVector () throw ()
uint32_t GetNumElements () const
 Number of elements in the vector.
void SetNumElements (uint32_t un32NumElements)
 Number of elements in the vector.
void Empty ()
 Resets the number of elements to 0.
virtual void RemoveElement (uint32_t index)
 Removes the element at the specified position.
void Save (const std::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 (const std::string &path, uint32_t un32Version)
 Saves the EVector object with all its attributes.
void Save (eVision::ESerializer *serializer, uint32_t un32Version)
 Saves the EVector object with all its attributes.
void Load (const std::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 (const std::string &path, uint32_t un32Version)
 Loads the EVector object with all its attributes.
void Load (eVision::ESerializer *serializer, uint32_t un32Version)
 Loads the EVector object with all its attributes.
 EVector (CppWrapperInternal::InternalConstructor)

Additional Inherited Members

Public Attributes inherited from eVision::EVector
CppWrapperInternal::WrappedClass wrappedClass_

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 EC24Vector::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::GetNumElements.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EC24Vector() [1/4]

eVision::EC24Vector::EC24Vector ( )

Constructs a vector.

◆ EC24Vector() [2/4]

eVision::EC24Vector::EC24Vector ( uint32_t maxNumberOfElements)

Constructs a vector.

Parameters
maxNumberOfElementsOptionally, memory can be pre-allocated to accommodate a given number of elements.

◆ EC24Vector() [3/4]

eVision::EC24Vector::EC24Vector ( const eVision::EC24Vector & other)

Constructs a vector.

Parameters
otherEC24Vector object to be copied

◆ ~EC24Vector()

eVision::EC24Vector::~EC24Vector ( )
throw ( )
virtual

◆ EC24Vector() [4/4]

eVision::EC24Vector::EC24Vector ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ AddElement()

void eVision::EC24Vector::AddElement ( eVision::EC24 element)

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

Parameters
elementThe element to be added.

◆ Draw() [1/8]

void eVision::EC24Vector::Draw ( eVision::EDrawAdapter * graphicContext,
float width,
float height ) const

Draws a plot of the vector element values.

Parameters
graphicContextHandle of the device context on which to draw.
widthOutermost horizontal size, in pixels.
heightOutermost vertical size, in pixels.

A vector is able to draw itself in a window. The vector plots the element values as a function of the element indices. The drawing appears on a neutral background. Drawing is done in the device context associated to the desired window. To draw the curves, the current pen is used. To draw the annotations, a black pen is used instead.

In the special case of the EC24Vector, three curves are drawn instead of one, each corresponding to a color component. Three pen objects must be provided to draw the curves with appropriate attributes.

◆ Draw() [2/8]

void eVision::EC24Vector::Draw ( eVision::EDrawAdapter * graphicContext,
float width,
float height,
const eVision::ERGBColor & color0,
const eVision::ERGBColor & color1,
const eVision::ERGBColor & color2 ) const

Draws a plot of the vector element values.

Parameters
graphicContextHandle of the device context on which to draw.
widthOutermost horizontal size, in pixels.
heightOutermost vertical size, in pixels.
color0The color to be used when drawing the curve of the first color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.
color1The color to be used when drawing the curve of the second color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.
color2The color to be used when drawing the curve of the third color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.

A vector is able to draw itself in a window. The vector plots the element values as a function of the element indices. The drawing appears on a neutral background. Drawing is done in the device context associated to the desired window. To draw the curves, the current pen is used. To draw the annotations, a black pen is used instead.

In the special case of the EC24Vector, three curves are drawn instead of one, each corresponding to a color component. Three pen objects must be provided to draw the curves with appropriate attributes.

◆ Draw() [3/8]

void eVision::EC24Vector::Draw ( eVision::EDrawAdapter * graphicContext,
float width,
float height,
float originX,
float originY ) const

Draws a plot of the vector element values.

Parameters
graphicContextHandle of the device context on which to draw.
widthOutermost horizontal size, in pixels.
heightOutermost vertical size, in pixels.
originXAbscissa of the upper left corner of the plot's bounding rectangle, in pixels. By default, the upper left corner of the window is used.
originYOrdinate of the upper left corner of the plot's bounding rectangle, in pixels. By default, the upper left corner of the window is used.

A vector is able to draw itself in a window. The vector plots the element values as a function of the element indices. The drawing appears on a neutral background. Drawing is done in the device context associated to the desired window. To draw the curves, the current pen is used. To draw the annotations, a black pen is used instead.

In the special case of the EC24Vector, three curves are drawn instead of one, each corresponding to a color component. Three pen objects must be provided to draw the curves with appropriate attributes.

◆ Draw() [4/8]

void eVision::EC24Vector::Draw ( eVision::EDrawAdapter * graphicContext,
float width,
float height,
float originX,
float originY,
const eVision::ERGBColor & color0,
const eVision::ERGBColor & color1,
const eVision::ERGBColor & color2 ) const

Draws a plot of the vector element values.

Parameters
graphicContextHandle of the device context on which to draw.
widthOutermost horizontal size, in pixels.
heightOutermost vertical size, in pixels.
originXAbscissa of the upper left corner of the plot's bounding rectangle, in pixels. By default, the upper left corner of the window is used.
originYOrdinate of the upper left corner of the plot's bounding rectangle, in pixels. By default, the upper left corner of the window is used.
color0The color to be used when drawing the curve of the first color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.
color1The color to be used when drawing the curve of the second color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.
color2The color to be used when drawing the curve of the third color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.

A vector is able to draw itself in a window. The vector plots the element values as a function of the element indices. The drawing appears on a neutral background. Drawing is done in the device context associated to the desired window. To draw the curves, the current pen is used. To draw the annotations, a black pen is used instead.

In the special case of the EC24Vector, three curves are drawn instead of one, each corresponding to a color component. Three pen objects must be provided to draw the curves with appropriate attributes.

◆ Draw() [5/8]

void eVision::EC24Vector::Draw ( HDC graphicContext,
float width,
float height ) const

Draws a plot of the vector element values.

Parameters
graphicContextHandle of the device context on which to draw.
widthOutermost horizontal size, in pixels.
heightOutermost vertical size, in pixels.

A vector is able to draw itself in a window. The vector plots the element values as a function of the element indices. The drawing appears on a neutral background. Drawing is done in the device context associated to the desired window. To draw the curves, the current pen is used. To draw the annotations, a black pen is used instead.

In the special case of the EC24Vector, three curves are drawn instead of one, each corresponding to a color component. Three pen objects must be provided to draw the curves with appropriate attributes.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [6/8]

void eVision::EC24Vector::Draw ( HDC graphicContext,
float width,
float height,
const eVision::ERGBColor & color0,
const eVision::ERGBColor & color1,
const eVision::ERGBColor & color2 ) const

Draws a plot of the vector element values.

Parameters
graphicContextHandle of the device context on which to draw.
widthOutermost horizontal size, in pixels.
heightOutermost vertical size, in pixels.
color0The color to be used when drawing the curve of the first color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.
color1The color to be used when drawing the curve of the second color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.
color2The color to be used when drawing the curve of the third color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.

A vector is able to draw itself in a window. The vector plots the element values as a function of the element indices. The drawing appears on a neutral background. Drawing is done in the device context associated to the desired window. To draw the curves, the current pen is used. To draw the annotations, a black pen is used instead.

In the special case of the EC24Vector, three curves are drawn instead of one, each corresponding to a color component. Three pen objects must be provided to draw the curves with appropriate attributes.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [7/8]

void eVision::EC24Vector::Draw ( HDC graphicContext,
float width,
float height,
float originX,
float originY ) const

Draws a plot of the vector element values.

Parameters
graphicContextHandle of the device context on which to draw.
widthOutermost horizontal size, in pixels.
heightOutermost vertical size, in pixels.
originXAbscissa of the upper left corner of the plot's bounding rectangle, in pixels. By default, the upper left corner of the window is used.
originYOrdinate of the upper left corner of the plot's bounding rectangle, in pixels. By default, the upper left corner of the window is used.

A vector is able to draw itself in a window. The vector plots the element values as a function of the element indices. The drawing appears on a neutral background. Drawing is done in the device context associated to the desired window. To draw the curves, the current pen is used. To draw the annotations, a black pen is used instead.

In the special case of the EC24Vector, three curves are drawn instead of one, each corresponding to a color component. Three pen objects must be provided to draw the curves with appropriate attributes.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [8/8]

void eVision::EC24Vector::Draw ( HDC graphicContext,
float width,
float height,
float originX,
float originY,
const eVision::ERGBColor & color0,
const eVision::ERGBColor & color1,
const eVision::ERGBColor & color2 ) const

Draws a plot of the vector element values.

Parameters
graphicContextHandle of the device context on which to draw.
widthOutermost horizontal size, in pixels.
heightOutermost vertical size, in pixels.
originXAbscissa of the upper left corner of the plot's bounding rectangle, in pixels. By default, the upper left corner of the window is used.
originYOrdinate of the upper left corner of the plot's bounding rectangle, in pixels. By default, the upper left corner of the window is used.
color0The color to be used when drawing the curve of the first color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.
color1The color to be used when drawing the curve of the second color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.
color2The color to be used when drawing the curve of the third color component of the vector, as an RGB color. By default, the current pen is used to draw the curve.

A vector is able to draw itself in a window. The vector plots the element values as a function of the element indices. The drawing appears on a neutral background. Drawing is done in the device context associated to the desired window. To draw the curves, the current pen is used. To draw the annotations, a black pen is used instead.

In the special case of the EC24Vector, three curves are drawn instead of one, each corresponding to a color component. Three pen objects must be provided to draw the curves with appropriate attributes.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ GetElement()

eVision::EC24 eVision::EC24Vector::GetElement ( int32_t index) const

Returns the vector element at the given index.

Parameters
indexIndex, between 0 and EVector::GetNumElements (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.

◆ GetRawDataPtr()

void * eVision::EC24Vector::GetRawDataPtr ( ) const

Pointer to the vector data.

◆ operator=()

eVision::EC24Vector & eVision::EC24Vector::operator= ( const eVision::EC24Vector & other)

Copies all the data from another EC24Vector object into the current EC24Vector object.

Parameters
otherEC24Vector object to be copied

◆ operator[]()

eVision::EC24 & eVision::EC24Vector::operator[] ( uint32_t index) const

Gives access to the vector element at the given index.

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

◆ SetElement()

void eVision::EC24Vector::SetElement ( int32_t index,
eVision::EC24 value )

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

Parameters
indexIndex, between 0 and EVector::GetNumElements (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.

◆ SetYRange() [1/3]

void eVision::EC24Vector::SetYRange ( )

◆ SetYRange() [2/3]

void eVision::EC24Vector::SetYRange ( int32_t n32YMin)

◆ SetYRange() [3/3]

void eVision::EC24Vector::SetYRange ( int32_t n32YMin,
uint32_t un32YMax )