Debian Codegraph @

contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Exports.cs

raw
1 /*
2 * Created by SharpDevelop.
3 * User: lextm
4 * Date: 2008/6/7
5 * Time: 17:34
6 *
7 * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 */
9
10 using System.Collections.Generic;
11
12 namespace Lextm.SharpSnmpLib.Mib.Elements
13 {
14 /// <summary>
15 /// Description of Exports.
16 /// </summary>
17 public sealed class Exports: IElement
18 {
19 private IModule _module;
20 private readonly IList<string> _types = new List<string>();
21
22 public Exports(IModule module, ISymbolEnumerator s)
23 {
24 _module = module;
25
26 Symbol previous = null;
27 Symbol current;
28 do
29 {
30 current = s.NextSymbol();
31
32 if (current == Symbol.EOL)
33 {
34 continue;
35 }
36 else if (((current == Symbol.Comma) || (current == Symbol.Semicolon)) && (previous != null))
37 {
38 previous.AssertIsValidIdentifier();
39 _types.Add(previous.ToString());
40 }
41
42 previous = current;
43 }
44 while (current != Symbol.Semicolon);
45 }
46
47 #region IElement Member
48
49 public IModule Module
50 {
51 get { return _module; }
52 }
53
54 #endregion
55 }
56 }