예제 #1
0
        public AD7Property(string name, AD7ProgramNode node, RoutineScope rs, bool readOnly)
        {
            Debug.WriteLine("AD7Property ctor (string,AD7ProgramNode,RoutineScope,bool)");
            Name      = name;
            _node     = node;
            _rs       = rs;
            _readOnly = readOnly;
            TypeName  = null;
            StoreType st;

            if (_node.Debugger.Debugger.ScopeVariables.TryGetValue(name, out st))
            {
                TypeName = _node.Debugger.Debugger.ScopeVariables[name].Type;
                if (numberTypeMax.ContainsKey(TypeName) && st.Unsigned)
                {
                    TypeName += " unsigned";
                }
            }
            Value = GetValue(name);
            if (TypeName == null)
            {
                // an heuristic to find out an expression type.
                TypeName = StoreType.InferTypeExpression(Value);
            }
        }