Exemplo n.º 1
0
        //============================================================================
        /// <summary>
        /// Adds an item to the list of user-specified outputs
        /// </summary>
        /// <param name="sName"></param>
        /// <param name="sAlias"></param>
        /// <param name="iDecPl"></param>
        /// <param name="Aggreg"></param>
        //============================================================================
        public void addVariable(string sName, string sAlias, int iDecPl, TGenericReporter.AggregType Aggreg)
        {
            if (sName.Length > 0)
            {
                TMainOutputSpecifier Specifier = new TMainOutputSpecifier(sName);                    // Make up the specifier
                Specifier.iDecPl = iDecPl;
                Specifier.Aggreg = Aggreg;
                if (sAlias.Length > 0)
                {
                    Specifier.sAlias = sAlias;
                }
                else
                {
                    Specifier.sAlias = sName;
                }

                //add the name of the variable to the FRequests list
                Specifier.iReqIdx = FRequestNames.IndexOf(Specifier.sName);
                if (Specifier.iReqIdx == -1)
                {                                                                       // If the main variable name is new,
                    Specifier.iReqIdx = FRequestNames.Count;                            //   add it to the list of variables to request
                    FRequestNames.Add(Specifier.sName);
                    FRequests.Add(null);                                                //keep an item parallel to it
                }

                Specifier.valTree            = new TValTree(null, Specifier);
                Specifier.valTree.columnName = Specifier.sAlias;

                FOutputs.Add(Specifier);                           // Store the output specifier in FOutputs
            }
        }
Exemplo n.º 2
0
 //============================================================================
 /// <summary>
 ///
 /// </summary>
 /// <param name="aParent"></param>
 /// <param name="aSpecifier"></param>
 //============================================================================
 public TValTree(TValTree aParent, TMainOutputSpecifier aSpecifier)
 {
     parent    = aParent;
     specifier = aSpecifier;
     varId     = -1;
     colNo     = -1;
     index     = 0;
     subTrees  = new List <TValTree>();
 }
Exemplo n.º 3
0
        //==============================================================================
        /// <summary>
        /// Return a ptr to a TMainOutputSpecifier object found at index in the
        /// FOutputs list of objects. Returns nil if not found.
        /// </summary>
        /// <param name="index">index = 0->n</param>
        /// <returns></returns>
        //==============================================================================
        public TMainOutputSpecifier getVariable(uint index)
        {
            TMainOutputSpecifier result = null;

            if ((index >= 0) && (index < FOutputs.Count))
            {
                result = FOutputs[(int)index];
            }
            return(result);
        }
Exemplo n.º 4
0
        //==============================================================================
        /// <summary>
        ///
        /// </summary>
        /// <param name="sVariableName"></param>
        /// <param name="aValue"></param>
        /// <param name="iParentID"></param>
        /// <param name="iIndex"></param>
        /// <param name="Specifier"></param>
        /// <returns></returns>
        //==============================================================================
        protected virtual int defineVariable(string sVariableName, TDDMLValue aValue, int iParentID,
                                             int iIndex, TMainOutputSpecifier Specifier)
        {
            int result;

            if (FColumns.Count < 1)
            {
                result = -1;
            }
            else
            {
                result = FColumns.Count;
            }
            return(result);
        }