Skip to content
Snippets Groups Projects
Commit b928562f authored by Christian Gutsche's avatar Christian Gutsche
Browse files

renaming in readme

parent 77642f15
Branches main
No related tags found
No related merge requests found
......@@ -13,26 +13,26 @@ Will then add all the function listed below to the namespace.
With
`import .context`
e.g. you have to write context.getRoles().
e.g. you have to write context.getMixins().
### Some Background Structures
`Context`
An abstract type. Will be super type of concrete context types.
`Role`
An abstract type. Will be super type of concrete role types.
`Mixin`
An abstract type. Will be super type of concrete mixin types.
`ContextManagement`
A data base for all contexts and roles that are defined and active.
A data base for all contexts and mixins that are defined and active.
### Available Functions and Macros
`@newContext <<Context Name>>`
Creates a new Type `<<Context Name>>ContextType` and an Object `<<Context Name>>` of this type
`@newRole <<Role Name>> <<List of Attributes>> <<Context, role lives in>> <<Type, role can be assigned to>>`
Creates a new Struct `<<Role Name>>` with the Attributes defined in `<<List of Attributes>>`
`@newMixin <<Mixin Name>> <<List of Attributes>> <<Context, mixin lives in>> <<Type, mixin can be assigned to>>`
Creates a new Struct `<<Mixin Name>>` with the Attributes defined in `<<List of Attributes>>`
`@context <<Context Name>> <<function Definition>>`
Creates a function, specifically defined for the context <<Context Name>>. Note that, the variable `context` will be available inside the function by default.
......@@ -40,25 +40,25 @@ Creates a function, specifically defined for the context <<Context Name>>. Note
`@context <<Context Name>> <<function call>>`
Calls a function, that was defined via `@context <<Context Name>> <<function Definition>>`. Note that, the variable `context` will be available inside the function by default.
`assignRole(<<Type>> => <<Role Name>>(<<Role Attributes>>), <<Context Name>>)`
`@context <<Context Name>> assignRole(<<Type>> => <<Role Name>>(<<Role Attributes>>))`
Assigns a Role <<Role Name>> to a <<Type>> in the context <<Context Name>>
`assignMixin(<<Type>> => <<Mixin Name>>(<<Mixin Attributes>>), <<Context Name>>)`
`@context <<Context Name>> assignMixin(<<Type>> => <<Mixin Name>>(<<Mixin Attributes>>))`
Assigns a Mixin <<Mixin Name>> to a <<Type>> in the context <<Context Name>>
`disassignRole(<<Type>> => <<Role Name>>(<<Role Attributes>>), <<Context Name>>)`
`@context <<Context Name>> disassignRole(<<Type>> => <<Role Name>>(<<Role Attributes>>))`
Disassigns a Role <<Role Name>> to a <<Type>> in the context <<Context Name>>
`disassignMixin(<<Type>> => <<Mixin Name>>(<<Mixin Attributes>>), <<Context Name>>)`
`@context <<Context Name>> disassignMixin(<<Type>> => <<Mixin Name>>(<<Mixin Attributes>>))`
Disassigns a Mixin <<Mixin Name>> to a <<Type>> in the context <<Context Name>>
`getContexts()`
Returns a list of all defined Contexts.
`getRoles()`
Returns a `Dict{Context, Dict{Any, Vector{DataType}}}` of all defined Roles. E.g.: {<<Context Name 1>> => {<<Class Name 1>> => [<<Role 1>>], <<Class Name 2>> => [<<Role 2>>]}, <<Context Name 2>>=>{<<Class Name 1>> => [<<Role 3>>, <<Role 4>>]}}
`getMixins()`
Returns a `Dict{Context, Dict{Any, Vector{DataType}}}` of all defined Mixins. E.g.: {<<Context Name 1>> => {<<Class Name 1>> => [<<Mixin 1>>], <<Class Name 2>> => [<<Mixin 2>>]}, <<Context Name 2>>=>{<<Class Name 1>> => [<<Mixin 3>>, <<Mixin 4>>]}}
`getRoles(<<Object Name>>)`
`getMixins(<<Object Name>>)`
Returns a `Dict{Context, DataType}` for a specific object <<Object Name>>.
`getRole(<<Object Name>>, <<Context Name>>)`
Returns the Role, that <<Object Name>> is playing in the context <<Context Name>>.
`getMixin(<<Object Name>>, <<Context Name>>)`
Returns the Mixin, that <<Object Name>> is playing in the context <<Context Name>>.
### Example
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment