public static GuiEnum fromUML( UmlEnum st ) { GuiEnum s = new GuiEnum(); s.name = st.UniqueName; s.st = st; s.Created(); return s; }
private void LoadEnum( UmlTypeHolder scope, EnumDecl decl, UsingBlock usings ) { // get cl from old classes, or create a new one UmlEnum en = null; foreach( UmlType ent in scope.Types ) { if( ent.name.Equals( decl.name.identifier ) && ent is UmlEnum ) { en = (UmlEnum)ent; break; } } if( en == null ) { en = new UmlEnum(); scope.Types.Add( en ); added_classes.Add( en ); } // register class classes[en] = decl; // fill with information en.Deleted = false; en.name = decl.name.identifier; }
private void UpdateEnum( UmlEnum en, EnumDecl enumdecl ) { if( en.Members == null ) en.Members = new ArrayList(); else en.Members.Clear(); if( enumdecl.children != null ) foreach( EnumValueNode j in enumdecl.children.nodes ) { UmlEnumField uef = new UmlEnumField(); uef.name = j.name.identifier; en.Members.Add( uef ); } }
public override void PostLoad() { st = parent.proj.model.GetObject( name ) as UmlEnum; base.PostLoad(); }