init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
73
Tools/CodeGeneration/Templates/Common/ModelDataRetreive.tdl
Normal file
73
Tools/CodeGeneration/Templates/Common/ModelDataRetreive.tdl
Normal file
|
@ -0,0 +1,73 @@
|
|||
//***************************************************************************//
|
||||
// Megmondja egy osztályról, hogy entitásból származik-e vagy sem //
|
||||
// visszatérési értékei [true | false] //
|
||||
//***************************************************************************//
|
||||
proc IsMasterEntity(MClass)
|
||||
loop (MClass -> SuperClass as super)
|
||||
if ( GetStereoType([super]) == "Entity" )
|
||||
return "false";
|
||||
else
|
||||
return "true";
|
||||
end if
|
||||
end loop
|
||||
return "true";
|
||||
end proc
|
||||
|
||||
|
||||
//***************************************************************************//
|
||||
// visszaadja az attribútumhoz megadott taggedvalue értékét //
|
||||
//***************************************************************************//
|
||||
proc GetTaggedValueOfAttribute(MAttribute, taggedvaluename)
|
||||
local taggedvalue = "";
|
||||
loop (MAttribute -> TaggedValue Where toLower([TaggedValue.tag])==toLower([taggedvaluename]))
|
||||
[taggedvalue] = [TaggedValue.value];
|
||||
end loop
|
||||
|
||||
return [taggedvalue];
|
||||
end proc
|
||||
|
||||
|
||||
//***************************************************************************//
|
||||
// visszaadja a megadott típusnévhez tartozó megadott taggedvalue értékért //
|
||||
//***************************************************************************//
|
||||
proc GetTaggedValueOfType(typeName,taggedvalue)
|
||||
loop (Instances -> MClass Where toLower([MClass.name]) == toLower([typeName]) )
|
||||
loop (MClass -> TaggedValue Where toLower([TaggedValue.tag]) == toLower([taggedvalue]))
|
||||
return [TaggedValue.value];
|
||||
end loop
|
||||
end loop
|
||||
end proc
|
||||
|
||||
|
||||
//***************************************************************************//
|
||||
// Meghatározza, hogy a paraméterként kapott asszociációhoz tartozik-e //
|
||||
// asszociációs osztály, ha igen akkor az asszociációs osztály azonosítóját //
|
||||
// adja vissza, egyébként üres sztringet. //
|
||||
//***************************************************************************//
|
||||
proc HasAssociationClass(MAssociation as Ass)
|
||||
loop(Ass -> AssociationClass)
|
||||
return [AssociationClass.id];
|
||||
end loop
|
||||
return "";
|
||||
end proc
|
||||
|
||||
|
||||
//***************************************************************************//
|
||||
// Listában adja vissza a modelben definiált tipizált dictionary Item //
|
||||
// típusokat //
|
||||
//***************************************************************************//
|
||||
proc GetDictionaryItemTypes()
|
||||
if ([DI_CACHEINITIALIZED] == "true")
|
||||
return [DI_CACHE];
|
||||
end if
|
||||
local dictitems = "";
|
||||
loop (Instances -> MClass Where(GetStereoType([MClass]) == "Entity" ) )
|
||||
loop( MClass -> MAttribute Where ([MAttribute.type] == "DictionaryItem"))
|
||||
[dictitems] = AddDistinctValueToTokenSet([dictitems], [MAttribute.defaultValue]);
|
||||
end loop
|
||||
end loop
|
||||
[DI_CACHE] = [dictitems];
|
||||
[DI_CACHEINITIALIZED] = "true";
|
||||
return [dictitems];
|
||||
end proc
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue