<< Click to Display Table of Contents >> Navigation: Using SMILE > Naming conventions and identifiers |
The names of all publicly accessible SMILE classes and functions start with the DSL_ prefix and use camel case afterwards. For example:
DSL_network
DSL_node
Constants and #defined symbols start with the same DSL_ prefix followed by all-uppercase letters, for example:
DSL_OKAY
DSL_CPT
SMILE requires nodes in the network to have unique textual identifiers (in addition to potentially non-unique names and descriptions). A valid identifier starts with a letter and contains letters, decimal digits, and underscores. Rules for identifier syntax are also used in other parts of the SMILE API. For example, the names of the custom functions and user properties must be valid identifiers.
The letter in the identifier is defined as characters from a-z and A-Z range, but also any Unicode character with the codepoint greater than 127 (the Unicode character category is not checked). This allows for identifiers containing mathematical symbols, letters from alphabets other than Latin, or even emojis. Of course the program that renders the graphical view of your network must be able to use Unicode. Here is how a simple two-node network with emoji node ids may look in GeNIe: