예제 #1
0
        List <ReportClass> _Items;                       // list of report class

        internal Classes(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Items = new List <ReportClass>();
            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                if (xNodeLoop.Name == "Class")
                {
                    ReportClass rc = new ReportClass(r, this, xNodeLoop);
                    _Items.Add(rc);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For Classes at least one Class is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
        TypeCode _ReturnTypeCode; // the return type

        #endregion Fields

        #region Constructors

        /// <summary>
        /// passed ReportClass, function name, and args for evaluation
        /// </summary>
        public FunctionCustomInstance(ReportClass rc, string f, IExpr[] a, TypeCode type)
        {
            _Cls = null;
            _Func = f;
            _Args = a;
            _Rc = rc;
            _ReturnTypeCode = type;

            _ArgTypes = new Type[a.Length];
            int i=0;
            foreach (IExpr ex in a)
            {
                _ArgTypes[i++] = XmlUtil.GetTypeFromTypeCode(ex.GetTypeCode());
            }
        }
예제 #3
0
        Type[] _ArgTypes;               // argument types

        /// <summary>
        /// passed ReportClass, function name, and args for evaluation
        /// </summary>
        public FunctionCustomInstance(ReportClass rc, string f, IExpr[] a, TypeCode type)
        {
            _Cls            = null;
            _Func           = f;
            _Args           = a;
            _Rc             = rc;
            _ReturnTypeCode = type;

            _ArgTypes = new Type[a.Length];
            int i = 0;

            foreach (IExpr ex in a)
            {
                _ArgTypes[i++] = XmlUtil.GetTypeFromTypeCode(ex.GetTypeCode());
            }
        }
예제 #4
0
        List<ReportClass> _Items; // list of report class

        #endregion Fields

        #region Constructors

        internal Classes(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Items = new List<ReportClass>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                if (xNodeLoop.Name == "Class")
                {
                    ReportClass rc = new ReportClass(r, this, xNodeLoop);
                    _Items.Add(rc);
                }
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For Classes at least one Class is required.");
            else
                _Items.TrimExcess();
        }