Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3044_variableScaling/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/4.0.3/EPPlus-4.0.3/FormulaParsing/ParsingScope.cs @ 18242

Last change on this file since 18242 was 12074, checked in by sraggl, 10 years ago

#2341: Added EPPlus-4.0.3 to ExtLibs

File size: 1.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using OfficeOpenXml.FormulaParsing.ExcelUtilities;
6
7namespace OfficeOpenXml.FormulaParsing
8{
9    /// <summary>
10    /// Represents a parsing of a single input or workbook addrses.
11    /// </summary>
12    public class ParsingScope : IDisposable
13    {
14        private readonly ParsingScopes _parsingScopes;
15
16        public ParsingScope(ParsingScopes parsingScopes, RangeAddress address)
17            : this(parsingScopes, null, address)
18        {
19        }
20
21        public ParsingScope(ParsingScopes parsingScopes, ParsingScope parent, RangeAddress address)
22        {
23            _parsingScopes = parsingScopes;
24            Parent = parent;
25            Address = address;
26            ScopeId = Guid.NewGuid();
27        }
28
29        /// <summary>
30        /// Id of the scope.
31        /// </summary>
32        public Guid ScopeId { get; private set; }
33
34        /// <summary>
35        /// The calling scope.
36        /// </summary>
37        public ParsingScope Parent { get; private set; }
38
39        /// <summary>
40        /// The address of the cell currently beeing parsed.
41        /// </summary>
42        public RangeAddress Address { get; private set; }
43
44        /// <summary>
45        /// True if the current scope is a Subtotal function beeing executed.
46        /// </summary>
47        public bool IsSubtotal { get; set; }
48
49        public void Dispose()
50        {
51            _parsingScopes.KillScope(this);
52        }
53    }
54}
Note: See TracBrowser for help on using the repository browser.