Exemplo n.º 1
0
        private void ProcessAttribute(
            SEntity oneEntity,
            string AttributeName)
        {
            SAttribute satt     = new SAttribute(AttributeName);
            SToken     oneToken = SLexer.Tokenizer(_dataStream);

            if (oneToken.TokenType != STokenType.COLON)
            {
                throw new Exception("Error in attribute : " + SLexer.CurrentRow + " : " + SLexer.CurrentColumn);
            }

            satt.Type = ProcessParameter();
            oneEntity.ParameterList.Add(satt);
        }
Exemplo n.º 2
0
 private void UpateEntityAttribute(SAttribute sAtt)
 {
     if (sAtt.Type is SParamNamed)
     {
         var sn = (SParamNamed)sAtt.Type;
         sn.NamedReference = FindNamedSItem(sn.NamedRefString);
         if (sn.NamedReference is SEntity)
         {
             sn.SetType(SParamType.ENTITY);
         }
         else
         {
             sn.SetType(SParamType.TYPE);
         }
     }
     else if (sAtt.Type is SParamCollection)
     {
         UpdateParamCollection((SParamCollection)sAtt.Type);
     }
 }
Exemplo n.º 3
0
        private void ProcessAttribute(
            SEntity oneEntity,
            string AttributeName)
        {
            SAttribute satt = new SAttribute(AttributeName);
            SToken oneToken = SLexer.Tokenizer(_dataStream);
            if (oneToken.TokenType != STokenType.COLON)
            { throw new Exception("Error in attribute : " + SLexer.CurrentRow + " : " + SLexer.CurrentColumn); }

            satt.Type = ProcessParameter();
            oneEntity.ParameterList.Add(satt);
        }
        private void AddAttributeDef(Parameter parameter, SAttribute sAtt)
        {
            if (parameter.ParameterType == SParamType.UNSET) return;

            parameter.SchemaAttDef = sAtt;

            if (parameter.ParameterType == SParamType.SET)
            {
                var sparam = sAtt.Type as SParamCollection;
                var pList = parameter as ParamList;
                if (sparam == null || pList == null) return;
                foreach (var item in pList.ParameterList)
                {
                    item.SchemaAttDef = new SAttribute(null, sparam.ParamReference);
                }
                parameter.updateParameterType(sAtt.Type.ParamType);
            }
        }
Exemplo n.º 5
0
 private void UpateEntityAttribute(SAttribute sAtt)
 {
     if (sAtt.Type is SParamNamed) {
         var sn = (SParamNamed)sAtt.Type;
         sn.NamedReference = FindNamedSItem (sn.NamedRefString);
         if (sn.NamedReference is SEntity) {
             sn.SetType (SParamType.ENTITY);
         } else {
             sn.SetType (SParamType.TYPE);
         }
     } else if (sAtt.Type is SParamCollection) {
         UpdateParamCollection ((SParamCollection)sAtt.Type);
     }
 }