Ejemplo n.º 1
0
 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 );
         }
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 internal static EnumDecl Enum( ListNode attributes, ModifiersNode modifiers, IdentNode name, TypeNode basetype, ListNode children, Symbol s )
 {
     EnumDecl res = new EnumDecl();
     res.kind = Kind.Enum;
     res.start = s.pos;
     res.end = s.endpos;
     res.attributes = attributes;
     res.modifiers = modifiers;
     res.name = name;
     res.basetype = basetype;
     res.children = children;
     return res;
 }