The ``pragma.py`` module ======================== .. py:module:: ansys.scade.apitools.prop.pragma Summary ------- .. py:currentmodule:: pragma .. tab-set:: .. tab-item:: Functions .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~find_pragma` - Get the pragma ID of an object. * - :py:attr:`~find_pragma_tool` - Get the pragma for an object. * - :py:attr:`~get_pragma_json` - Deserialize a text pragma containing a JSON document to a Python object. * - :py:attr:`~get_pragma_text` - Get the text of the pragma ID for an object. * - :py:attr:`~get_pragma_tool_text` - Get the text of the pragma for an object. * - :py:attr:`~remove_pragma` - Remove the pragma ID from an object. * - :py:attr:`~remove_pragma_tool` - Remove the pragma from an object. * - :py:attr:`~set_pragma_json` - Serialize a Python object to a JSON document in a textual pragma. * - :py:attr:`~set_pragma_text` - Update the pragma ID of an object with a new ID. * - :py:attr:`~set_pragma_tool_text` - Update the pragma ID which text starts with ``key`` of ``object_`` with ``text``. .. toctree:: :titlesonly: :maxdepth: 1 :hidden: 𝑓(x) find_pragma 𝑓(x) find_pragma_tool 𝑓(x) get_pragma_json 𝑓(x) get_pragma_text 𝑓(x) get_pragma_tool_text 𝑓(x) remove_pragma 𝑓(x) remove_pragma_tool 𝑓(x) set_pragma_json 𝑓(x) set_pragma_text 𝑓(x) set_pragma_tool_text Description ----------- Provides accessors for textual pragmas. A textual pragma is made of an identifier, usually related to a tool, and a text. The syntax and semantic of the text are specific to each tool. This library provides sets of accessors for several kinds of textual pragmas: * Generic pragmas: Any text. * Core tools pragmas: The text has the form `` []``. These core tools include ``kcg`` and ``mc``. * JSON pragmas: The text is an abribrary data formatted as JSON, usually a dictionary. Notes\: * This module assumes that the pragmas of a model element are unique per ```` or per ``(, )`` for core tools pragmas. * This module assumes that the value of a pragma that is not present is empty, instead of raising an exception. Thus, it automatically removes a pragma when its new value is empty. * This module wraps some existing functions of the SCADE Suite Python API that are not documented or listed in the Script Wizard's tables. * The editing functions return whether the model is modified. .. !! processed by numpydoc !!