.OpenModelica.Scripting.loadClassContentString

Information

Loads class content from a string and inserts it into the given loaded class. The existing class must be a long class definition, either normal or class extends. The content is merged according to the following rules:

Any section not merged is added after the last section of the same type, or where they would normally be placed if no such section exists (i.e. public/protected first, then equations, etc).

Example:

loadClassContentString("
    Real y;
  equation
    y = x;
", P.M);

Interface

function loadClassContentString
  input String data;
  input TypeName className;
  output Boolean success;
end loadClassContentString;

Generated at 2024-11-20T19:25:51Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos