Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relationships between types #11

Open
ctzurcanu opened this issue Mar 20, 2019 · 1 comment
Open

Relationships between types #11

ctzurcanu opened this issue Mar 20, 2019 · 1 comment

Comments

@ctzurcanu
Copy link
Collaborator

When TypeA is composed of component types, we need a way to know the 2 types of composition:
Composition by "has": TypeA has the right to insert (and manage) new instances into component types.
Composition by "link": TypeA does not have the right to insert new instances, but can choose between instances already managed by components.

@ctzurcanu
Copy link
Collaborator Author

Therefore:

struct Type1 {
        LangChoices lang;
        bool isEvent;
        bool isFunction;
        bool hasOutput;
        address contractAddress;
        bytes32 source;
        string name;
        string[] types;
    }

Should change to:

struct Type1 {
        LangChoices lang;
        bool isEvent;
        bool isFunction;
        bool hasOutput;
        address contractAddress;
        bytes32 source;
        string name;
        string[] types;
        string[] labels;
    }

with the requirement: types.length = labels.length
and if labels do not exist, types should be copied there with the concatenation of "_h" or "_l" (defaults to _h for "has")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant