public DataScopeInfo(int scopeId)
 {
     this.m_scopeID = scopeId;
     this.m_runningValuesOfAggregates      = new List <RunningValueInfo>();
     this.m_aggregatesOfAggregates         = new BucketedDataAggregateInfos();
     this.m_postSortAggregatesOfAggregates = new BucketedDataAggregateInfos();
 }
        public void Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(DataScopeInfo.m_Declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.AggregatesSpanGroupFilter:
                    this.m_aggregatesSpanGroupFilter = reader.ReadBoolean();
                    break;

                case MemberName.AggregatesOfAggregates:
                    this.m_aggregatesOfAggregates = (BucketedDataAggregateInfos)reader.ReadRIFObject();
                    break;

                case MemberName.PostSortAggregatesOfAggregates:
                    this.m_postSortAggregatesOfAggregates = (BucketedDataAggregateInfos)reader.ReadRIFObject();
                    break;

                case MemberName.RunningValuesOfAggregates:
                    this.m_runningValuesOfAggregates = reader.ReadGenericListOfRIFObjects <RunningValueInfo>();
                    break;

                case MemberName.ScopeID:
                    this.m_scopeID = reader.ReadInt32();
                    break;

                case MemberName.HasAggregatesToUpdateAtRowScope:
                    this.m_hasAggregatesToUpdateAtRowScope = reader.ReadBoolean();
                    break;

                case MemberName.IsDecomposable:
                    this.m_isDecomposable = reader.ReadBoolean();
                    break;

                case MemberName.DataSet:
                    this.m_dataSet = reader.ReadReference <DataSet>(this);
                    break;

                case MemberName.JoinInfo:
                    this.m_joinInfo = (JoinInfo)reader.ReadRIFObject();
                    break;

                case MemberName.DataPipelineID:
                    this.m_dataPipelineID = reader.ReadInt32();
                    break;

                case MemberName.GroupingFieldIndicesForServerAggregates:
                    this.m_groupingFieldIndicesForServerAggregates = reader.ReadListOfPrimitives <int>();
                    break;

                default:
                    Global.Tracer.Assert(false);
                    break;
                }
            }
        }
 public void ClearAggregatesIfEmpty()
 {
     Global.Tracer.Assert(null != this.m_aggregatesOfAggregates, "(null != m_aggregatesOfAggregates)");
     if (this.m_aggregatesOfAggregates.IsEmpty)
     {
         this.m_aggregatesOfAggregates = null;
     }
     Global.Tracer.Assert(null != this.m_postSortAggregatesOfAggregates, "(null != m_postSortAggregatesOfAggregates)");
     if (this.m_postSortAggregatesOfAggregates.IsEmpty)
     {
         this.m_postSortAggregatesOfAggregates = null;
     }
 }