Mentions légales du service

Skip to content

Add attribute default value

Vojtisek Didier requested to merge 129-add-default-syntax into master
  • added the notion of default values for attributes in the metamodel. It allows to set a constant or a list of constants.
  • added checkers for the expected type and multiplicity
  • implemented the corresponding code in the GEMOC simulator
  • includes tests for the syntax and the checkers

example syntax available in the tests

DefinitionGroup Behavior_def {
	assetTypes {
		AssetTypeAspect T1 {
			attribute isValid : Boolean default false
			attribute version : Integer default 10
			attribute name : String default ""			
			attribute booleanSet : Boolean[*] default [false, false, true] 
			attribute integerSet1 : Integer[*] default [ 10 ]
			attribute integerSet2 : Integer[*] default [77, 88]
			attribute stringSet : String[*] default ["v1", "v2"] 
		}

Closes #129 (closed)

Merge request reports