class DatatypeLibrary
Package: swiss.avm.up.core.generic.type.javamodel.DatatypeLibrary
Direct Known Subclasses: PlatformDatatypeLibrary
class DatatypeLibrary extends NamedResource, AOoDomainRoot, DatatypeLibraryOwner, ACallingBaseElement, AAutoPrefix, Commentable
A DatatypeLibrary holds the datatypes and constants used by a project and its controllers - enumerations, record types, function-block types and named constants. Controller interface and local variables are typed by its contents; a master library aggregates per-controller sub-libraries.
Properties
autoPrefix
use predifined prefixes
BooleanLiteral[0..1]
A literal where only the two values 'false' and 'true' are accepted.
classDiagram
OoClassTypeDiagram[0..N]
comment
Describes the intent of this Resource.
TextLiteral[0..1]
A Literal that accepts multiple lines of text.
constant
AConstant[0..N]
A named compile-time constant in a DatatypeLibrary, held via the library's constant relation. The concrete kind used in practice is Constant; AConstant is the abstract range.
Each constant has a type (a standard/IEC type) and an init value literal.
Naming convention is UPPER_SNAKE_CASE.
Use library constants for shared magic numbers (limits, timings, sizes) instead of hardcoding them in code snippets.
datatypeLibrary
DatatypeLibrary[0..N]
A DatatypeLibrary holds the datatypes and constants used by a project and its
controllers - enumerations, record types, function-block types and named
constants. Controller interface and local variables are typed by its contents; a
master library aggregates per-controller sub-libraries.
extends
Resource[0..N]
The base class of any Resource in the system.
extends
AOoDomain[0..N]
extends
DatatypeLibrary[0..0]
A DatatypeLibrary holds the datatypes and constants used by a project and its
controllers - enumerations, record types, function-block types and named
constants. Controller interface and local variables are typed by its contents; a
master library aggregates per-controller sub-libraries.
generateLibrary
BooleanLiteral[1..1]
A literal where only the two values 'false' and 'true' are accepted.
name
The name of this Resource.
StringLiteral[1..1]
overrides
Here objects of extensions can be overwritten.
OverrideableObjects[0..1]
type
Type[0..N]
Method Summary
filePath
filePath
filePathConstLib
filterGeneratedLibraries
@FDatatypeLibrary
Returns list with not generated libraries.
Return:
List<DatatypeLibrary>
getAllConstants
@DatatypeLibraryExtension
Return:
List<AConstant>
getConstants
@FDatatypeLibrary
Return:
List<AConstant>
getDataTypeLibrariesReq
@FDatatypeLibrary
Return:
List<DatatypeLibrary>
getDatatypeLibraries
@FDatatypeLibrary
Returns a recursive non-cyclic list of all datatype libraries. Starting from the current Datatype Library.
Return:
List<DatatypeLibrary>
getDatatypes
@TemplateFunction
Return:
List<Type>
getExtendableObjects
@FDatatypeLibrary
Return:
List<DatatypeLibrary>
getFunctionBlockTypes
@FDatatypeLibrary
returns all function block types and all depending function libraries
Return:
List<FunctionBlockType>
getNamespace
@FTemplateFunctions
getTypes
getTypes
@FDatatypeLibrary
get all types of current datatype library
Return:
List<Type>
getTypesRecursive
@FDatatypeLibrary
get all types of current and all implemented datatype libraries
Return:
List<Type>
hasAnyType
@TemplateFunction
Return:
BooleanLiteral
hasConstantType
@TemplateFunction
Return:
BooleanLiteral
hasEnumType
@FDatatypeLibrary
Return:
BooleanLiteral
hasStandardType
@TemplateFunction
Return:
BooleanLiteral
indexOf
Parameters:
ControllerTree
Model
Return:
IntegerLiteral