WOLFRAM SYSTEM MODELER

'class'

class

Wolfram Language

In[1]:=
SystemModel["ModelicaReference.Classes.'class'"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Define class

Examples

class MyTable
  extends ExternalObject;
  function constructor
     ...
  end constructor;

  function destructor
     ...
  end destructor;
end MyTable;

Syntax

   [ encapsulated ][ partial] class
   IDENT class_specifier

class_specifier :
   string_comment composition end IDENT
   | "=" base_prefix name [ array_subscripts ] [ class_modification ] comment
   | "=" enumeration "(" ( [enum_list] | ":" ) ")" comment

See Modelica Grammar for further details.

Description

The keyword class is used to define general classes (without any restrictions). It is identical to the keyword model. In most cases, it is recommended to use specialized classes as connector, model, block, package, record, function, type. "class" should be used to define ExternalObjects, and can be used for classes merely containing documentation and/or graphics.