• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - Simulator
  • StateVariableArray
  • 5.0.0

StateVariableArray Class

(CDPSim::StateVariableArray)

The StateVariableArray wraps an array of StateVariables. More...

Header: #include <StateVariableArray>
  • List of all members, including inherited members

Public Functions

StateVariableArray()
StateVariableArray(const StateVariableArray &other) = delete
~StateVariableArray()
void Create(const char *name, DynamicSimComponent *parent, int size)
int Size() const
StateVariableArray &operator=(const StateVariableArray &other) = delete
StateVariable &operator[](int i)

Detailed Description

The StateVariableArray wraps an array of StateVariables.

Usage

Create a member in the header file of a DynamicSimComponent inherited class. Can be accessed with notation like: A[4] = 3.0; and A[4].ddt = 2.0;.

Features

  • Creates an array of StateVariable objects.
  • Size is specified as a parameter to Create().
  • StateVariables created are registered as children of the DynamicSimComponent.

Member Function Documentation

StateVariableArray::StateVariableArray()

Default constructs an instance of StateVariableArray.

[delete] StateVariableArray::StateVariableArray(const StateVariableArray &other)

Copy constructor.

StateVariableArray::~StateVariableArray()

Destroys the instance of StateVariableArray.

void StateVariableArray::Create(const char *name, DynamicSimComponent *parent, int size)

Creates the instance, binds it to name and registers to parent.

int StateVariableArray::Size() const

Get number of StateVariables in this array.

[delete] StateVariableArray &StateVariableArray::operator=(const StateVariableArray &other)

Copy-assignment operator.

StateVariable &StateVariableArray::operator[](int i)

Allows notation like: A[4] = 3.0; and A[4].ddt = 2.0;

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top